Skip to content

Limit CPU usage of actions (or all sandboxed operations) #11275

Closed
@prashantv

Description

@prashantv

Description of the problem / feature request:

Ability to limit CPU usage of a single action to a single core.

Feature requests: what underlying problem are you trying to solve with this feature?

By default, bazel runs multiple actions in parallel, with concurrency determined by number of cores available. This has an implicit assumption that actions use a single core, but it's possible for actions to use more cores, which can end up negatively affecting other tests, as they may be CPU starved.

Ideally, bazel would set CPU limits such that a single action is limited to 1 core.

What operating system are you running Bazel on?

Linux 4.14 and 4.19

What's the output of bazel info release?

release 3.0.0

Have you found anything relevant by searching the web?

No, most of the resources I've found are about increasing the number of parallel jobs, or performance of the sandbox.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions