Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an optional speculation delay when using a remote cache (Cherry-pick of #16922) #16956

Merged
merged 1 commit into from Sep 22, 2022

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented Sep 21, 2022

When nailgun is combined with a remote cache, cancellation of nailgun processes due to cache hits results in nailgun servers getting killed (as expected: see #14937 for more on that topic).

But the cost of killing a nailgun server (which makes future processes run more slowly) is not currently accounted for by our default setting of speculating for all requests. And figuring out the exact likelihood that we will hit the cache is a challenging problem.

This change adds an (optional, but enabled by default) delay before starting a nailgun process when a remote cache is in use.

Fixes #16921.

[ci skip-build-wheels]

…ld#16922)

When `nailgun` is combined with a remote cache, cancellation of `nailgun` processes due to cache hits results in `nailgun` servers getting killed (as expected: see pantsbuild#14937 for more on that topic).

But the cost of killing a `nailgun` server (which makes _future_ processes run more slowly) is not currently accounted for by our default setting of speculating for all requests. And figuring out the exact likelihood that we will hit the cache is a challenging problem.

This change adds an (optional, but enabled by default) delay before starting a `nailgun` process when a remote cache is in use.

Fixes pantsbuild#16921.

[ci skip-build-wheels]
@stuhood
Copy link
Sponsor Member Author

stuhood commented Sep 21, 2022

Note that this wasn't a clean pick due to all of the changes to Process on main.

@stuhood stuhood merged commit a0a25da into pantsbuild:2.14.x Sep 22, 2022
@stuhood stuhood deleted the cherry-pick-16922-to-2.14.x branch September 22, 2022 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants