Skip to content

Hint mechanism to require more "slots" to build a crate #8405

Closed as not planned

Description

@joshtriplett

When building rust-lang/rust in parallel, I found that rustc_middle would take the vast majority of the compilation time and memory. I repeatedly ran into the OOM-killer because cargo would start up three more things building in parallel, and rustc_middle was already using 5-6GB of my 8GB of RAM. I'd like to be able to somehow hint to Cargo that it should treat rustc_middle as particularly heavy to build, and that it should count as multiple "slots" in the 4 parallel jobs Cargo would allow to run. That would have allowed me to successfully build within 8GB of RAM.

Activity

  1. added
    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
    on Jun 24, 2020
  2. added
    A-jobserverArea: jobserver, concurrency, parallelism
    on Jun 25, 2020
  3. luser commented on Feb 9, 2021

    @luser
    Contributor

    Possibly a duplicate of #7437?

  4. epage commented on Nov 2, 2023

    @epage
    Contributor

    #7437 is about package prioritization while this is about resource utilization.

  5. epage commented on Nov 3, 2023

    @epage
    Contributor

    #12912 discusses the OOM problem and is exploring smaller and bigger solutions. To keep the conversation in one place, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-executionArea: anything dealing with executing the compilerA-jobserverArea: jobserver, concurrency, parallelismC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions