-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)team-Local-ExecIssues and PRs for the Execution (Local) teamIssues and PRs for the Execution (Local) teamtype: feature request
Description
Description of the feature request:
There are several way of defining and allocating resources for bazel:
--local_cpu_resourcesand--local_ram_resourcescan be used to define the amount of cpu and ram available for bazel to consume. They both accept decimal values (float)--local_extra_resourcescan be used to model arbitrary abstract resources, also as floats- The
cpu:<n>tag (or execution info) can be used to request more cpus for an action (defaults to 1)- Only works for tests
- Only allows integer values, but it is modelled internally as a double
- The
resources:<resource>:<amount>can be used to request any amount of an arbitrary resource- Only applied to tests
- Accepts float values
- As far as I understand, there is no way of requesting more memory (ram), even thou it is modelled internally as number of MB (as a double value)
I would like have fine-grained controll on all the resources types and all the actions, with an unified api, which stores all the values as doubles, something like:
-
resources:<resource>:<amount>allows allocating any resource, including cpu and memory -
--local_resources=<resource>=<amount>can be used to specify the amount of any resource available for bazel to use. This would includecpuandmemory -
--default_test_resources=<resource>=<small>,<medium>,<large>,<enormous>allows setting the default allocation for test based on the test size. -
--default_resources=<resource>=<amount>can be used to change the default allocation for all actions -
resources:<resource>:<amount>can be applied to any action (not test only)
Which category does this issue belong to?
Local Execution
What underlying problem are you trying to solve with this feature?
In large, multi language repositories, the default values for resource allocation might not be suitable for all targets/actions. When that happens, bazel ends up over (or under) scheduling tasks, which affects performance and stability. With fine grained controll over the resource allocation, the build can be tweaked according to its needs.
Which operating system are you running Bazel on?
N/A
What is the output of bazel info release?
release 6.3.1
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
fmeum and deepinthebuild
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)team-Local-ExecIssues and PRs for the Execution (Local) teamIssues and PRs for the Execution (Local) teamtype: feature request