Skip to content

Less codegen parallelism than expected with -C codegen-units=16 #64913

Open
@SimonSapin

Description

@SimonSapin

This is the output of cargo build -Z timings for Servo, on a 14 cores / 28 threads machine, filtered with "Min unit time" at 10 seconds.

Edit: with Rust nightly-2019-09-28

a4fd0099519ccbda2e31718d46f1ff0e546886d6

For most of codegen for the script crate only 3 to 4 threads seem to be CPU-bound, leaving other cores idle, despite codegen-units=16 being the default. (Results are similar if I specify it explicitly.)

Shouldn’t CPU usage be much closer to min(ncpu, codegen-units)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationC-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchI-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions