Skip to content

[Feature]: Need ability to limit CPU and RAM usage in CI environments #12382

@oskvortsov

Description

@oskvortsov

What problem does this feature solve?

We're experiencing issues with Rspack consuming excessive CPU and RAM resources in our CI/CD pipelines, which is causing:

  • consumption of a large amount of memory over 30 gigabytes
  • using more processor cores

Current Behavior:
Rspack appears to use all available CPU cores and significant amounts of RAM during builds, which works well on development machines but causes problems in CI environments with strict resource limits.

My experience:
I run build process for 4 different app parallel and this is consume a lot of RAM and CPU, but I have been able to manage the large amount of RAM consumption if I run all the builds sequentially.

What does the proposed API of configuration look like?

Expected Behavior:
Ability to configure Rspack to:

  • Limit maximum CPU usage (e.g., use only 2 cores instead of all available)
  • Limit maximum RAM usage
  • Have better control over resource allocation in constrained environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending triageThe issue/PR is currently untouched.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions