-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Less codegen parallelism than expected with -C codegen-units=16 #64913
Copy link
Copy link
Open
Labels
A-codegenArea: Code generationArea: Code generationC-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationC-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is the output of
cargo build -Z timingsfor Servo, on a 14 cores / 28 threads machine, filtered with "Min unit time" at 10 seconds.Edit: with Rust
nightly-2019-09-28For most of codegen for the
scriptcrate only 3 to 4 threads seem to be CPU-bound, leaving other cores idle, despitecodegen-units=16being the default. (Results are similar if I specify it explicitly.)Shouldn’t CPU usage be much closer to
min(ncpu, codegen-units)?