Commit 1bc3cd22 authored by Aleksey Khoroshilov's avatar Aleksey Khoroshilov Committed by LUCI CQ

Add a global core limit support for goma/rbe builds.

This is very usable for non Google-sized Goma clusters. We want to use
NINJA_CORE_MULTIPLIER logic, but at the same time we don't want to stall
our cluster with super-high -j values.

Bug: 1323475
Change-Id: I2ed414463b4f397a7bcebe42ea0b996e52006cda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3632492
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 6a1494e5
......@@ -176,9 +176,11 @@ def main(args):
core_multiplier = int(
os.environ.get('NINJA_CORE_MULTIPLIER', default_core_multiplier))
j_value = num_cores * core_multiplier
core_limit = int(os.environ.get('NINJA_CORE_LIMIT', j_value))
j_value = min(j_value, core_limit)
if sys.platform.startswith('win'):
# On windows, j value higher than 1000 does not improve build
# performance.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment