Limit the number of parallel Bazel actions (#11779)

Limit the number of parallel actions spawned by Bazel to the number of
physical CPUs. (Assuming a CPU with hyperthreading enabled)

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
This commit is contained in:
Andreas Herrmann 2021-11-18 19:32:33 +01:00 committed by GitHub
parent a9754fe7d2
commit 5fb5784970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,14 @@ build --experimental_strict_action_env
# in us getting a certificate for githubassets.com instead.
startup --host_jvm_args=-Xms2g --host_jvm_args=-Xmx2g --host_jvm_args=-Djdk.tls.client.protocols=TLSv1.2
# Limit the number of parallel actions spawned by Bazel to the number of
# physical CPUs. (Assuming a CPU with hyperthreading enabled)
build --loading_phase_threads="HOST_CPUS*.5"
fetch --loading_phase_threads="HOST_CPUS*.5"
query --loading_phase_threads="HOST_CPUS*.5"
sync --loading_phase_threads="HOST_CPUS*.5"
build --local_cpu_resources="HOST_CPUS*.5"
# Enable sandboxing and caching for exclusive tests
build --incompatible_exclusive_test_sandboxed

View File

@ -33,6 +33,14 @@ build --experimental_strict_action_env
# in us getting a certificate for githubassets.com instead.
startup --host_jvm_args=-Xms2g --host_jvm_args=-Xmx2g --host_jvm_args=-Djdk.tls.client.protocols=TLSv1.2
# Limit the number of parallel actions spawned by Bazel to the number of
# physical CPUs. (Assuming a CPU with hyperthreading enabled)
build --loading_phase_threads="HOST_CPUS*.5"
fetch --loading_phase_threads="HOST_CPUS*.5"
query --loading_phase_threads="HOST_CPUS*.5"
sync --loading_phase_threads="HOST_CPUS*.5"
build --local_cpu_resources="HOST_CPUS*.5"
# Enable sandboxing and caching for exclusive tests
build --incompatible_exclusive_test_sandboxed