Use pidfd to monitor for process deletion instead of 100ms poll loop - #13952
Open
EtiennePerot wants to merge 1 commit into
Open
Use pidfd to monitor for process deletion instead of 100ms poll loop#13952EtiennePerot wants to merge 1 commit into
pidfd to monitor for process deletion instead of 100ms poll loop#13952EtiennePerot wants to merge 1 commit into
Conversation
As expected, cuts ~100ms from `runsc create` + `runsc delete` cycle.
Doesn't make container startup faster, but for systems that maintain a
constant number of idle sandboxes, this is a large difference in speed.
```
│ old │ new │
│ sec/op │ sec/op vs base │
CreateDelete 205.0m ± 4% 109.9m ± 8% -46.39% (p=0.000 n=20)
```
Collaborator
|
How does creating and deleting help a pool of idle containers , it literally doesn't have to create or delete containers unless it has to maintain some leaky buffer pattern |
Collaborator
Author
A sandbox cannot be safely reused after having run untrusted code. So a system that tries to maintain a densely-packed "warm pool" of sandboxes must ensure that the same number of sandboxes are always running, and must therefore recreate a new one as soon as another exits. Detecting that a sandbox has exited 100ms sooner means it can start the creation of a new sandbox 100ms earlier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As expected, cuts ~100ms from
runsc create+runsc deletecycle.Doesn't make container startup faster, but for systems that maintain a constant number of idle sandboxes, this is a large difference in speed.