You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit CPU usage of actions (or all sandboxed operations) #11275
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.
I think this is actually a dup of #10443. Just as we should allow actions to use more threads if possible, we should also limit them when not. Will add a note there.
Activity
jwnimmer-tri commentedon May 1, 2020
Possibly related to #3688 and #6477.
susinmotion commentedon May 4, 2020
@jin is this related to any of the work you're doing?
jin commentedon May 4, 2020
Not quite, I was more interested in restricting the degree of parallelism for a subset of actions, assuming they all use a single core each.
susinmotion commentedon May 4, 2020
Gotcha, thanks.
jmmv commentedon May 14, 2020
I think this is actually a dup of #10443. Just as we should allow actions to use more threads if possible, we should also limit them when not. Will add a note there.