-
Notifications
You must be signed in to change notification settings - Fork 96
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
Use a dedicated zygote process per container #828
base: main
Are you sure you want to change the base?
Conversation
f493e6d
to
fc79cde
Compare
Signed-off-by: Jorge Prendes <[email protected]>
fc79cde
to
98a4146
Compare
Great performance increase! I just ran a stress test on 1000 containers and with concurrency=32 Before After |
Strangely, the labeler does not work for this PR. This is the error msg:
Hope this PR could fix it: #829 Fixed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
crates/containerd-shim-wasm/src/sys/unix/container/container.rs:39
- The error message 'Failed to obtain PID' could be more descriptive to help with debugging.
.context("Failed to obtain PID")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is worth a CHANGELOG mentioning how the perf is now different.
This PR creates a dedicated zygote process per container.
This fixes issues with libcontainer changing the shim process global state (like chdir), which leads to race conditions on multithreaded programs.
This also helps with throughput, as the global zygote process was a bottleneck (since it's single threaded).
TODO: Add tests