builder: support cpu-core assignment for builders#3285
Merged
syphar merged 2 commits intorust-lang:mainfrom Apr 8, 2026
Merged
builder: support cpu-core assignment for builders#3285syphar merged 2 commits intorust-lang:mainfrom
syphar merged 2 commits intorust-lang:mainfrom
Conversation
GuillaumeGomez
approved these changes
Apr 8, 2026
Member
|
Looks all good to me, thanks! |
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.
Using rust-lang/rustwide#120.
My current assumption is that the quota-based cpu-limit makes our builds slower than they should be. This new feature allows us to assign the builder so specific cores. When we assign cores, docker won't stop and build because of the quota on one of the "virtual" cores. The rest should be handled by the OS scheduler.
Caveat:
webserver & watcher are not limited to the other (= non-builder) cores. I assume that the OS scheduler will put them onto more free cores when the build-cores are full. Watcher has higher CPU usage when it calculates the index-diff. Webserver has relatively high cpu usage (for a webserver) due to rustdoc html rewriting and quite a bit of compression / decompression.
deployment
I want to keep both options in the beginning, so I can just switch one of the builders and see if anything is odd, before changing the rest.
NOTE
This PR includes a new rustwide release, which includes an internal change into how we run containers. I don't think anything will break, but if things feel odd, we should remember that this was done too.