[reclient] Set some sensible defaults for racing that match goma

local_resource_fraction is set to 0.2 as goma limited the max local
racing subprocesses to num_cpu/5

racing_bias is set to 0.95 as experimentally that ensures reasonable
behaviour for cache hits.

This cl does not enable racing by default. These values are only used if
RBE_exec_strategy=racing is set

Test: Tested builds on my mac and linux cloudtop and got mostly remote exec
and cache hits with some local executions
Bug: b/288564971
Change-Id: Idb71c03f4addd23d0253dc5bf3564058cd212284
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4713186
Commit-Queue: Ben Segall <bentekkie@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
changes/86/4713186/2
Ben Segall 2 years ago committed by LUCI CQ
parent 7564393233
commit d3e43dd431

@ -180,6 +180,10 @@ def set_reproxy_path_flags(out_dir, make_dirs=True):
hashlib.sha256(tmp_dir.encode()).hexdigest())
def set_racing_defaults():
os.environ.setdefault("RBE_local_resource_fraction", "0.2")
os.environ.setdefault("RBE_racing_bias", "0.95")
@contextlib.contextmanager
def build_context(argv, tool):
@ -214,6 +218,8 @@ def build_context(argv, tool):
print('WARNING: Using RBE_instance=%s\n' %
os.environ.get('RBE_instance', ''))
set_racing_defaults()
# TODO(b/292523514) remove this once a fix is landed in reproxy
remove_mdproxy_from_path()

Loading…
Cancel
Save