-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Reduce the default number of CGUs for incremental. #111666
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
Reduce the default number of CGUs for incremental. #111666
Conversation
My local measurements suggested that 128 was clearly better than 256, and 64 was slightly better again. Let's see what CI says. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 5407fe39ae91e062d1d31d69197af4ae351d1f5f with merge 3b2fafd65a7058220b97fb6097fec300c5482372... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (3b2fafd65a7058220b97fb6097fec300c5482372): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 643.756s -> 643.951s (0.03%) |
Instruction counts and cycles should be ignored here. Walltime, max-rss, and binary size are the important metrics. That one terrible webrender results skews everything badly. It's probably a bit of freak random pathological case, and we can pretty much ignore it because With that in mind, looking at just the primary
So overall I think the results are pretty decent, better than they might appear at first glance, and this is worth considering. 256 codegen units (and thus 256 threads) is a lot! |
Because it gives better performance.
5407fe3
to
a0954f7
Compare
Now let's try 64 CGUs. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit a0954f7 with merge 26269dfb9e9b933270bec418381c5dbf44934013... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (26269dfb9e9b933270bec418381c5dbf44934013): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 642.109s -> 643.649s (0.24%) |
Larger benchmarks have more CGUs, and reducing the max number of CGUs means they do more CGU merging, which increases the chance that a small change causes an outsized amount of codegen being redone. That explains the drastic regressions on the #112441 is an experiment in the other direction -- it disables all CGU merging in incremental builds, effectively setting the CGU limit to infinity. |
Because it gives better performance.
r? @ghost