From 831360f1ffe9b10c4524ca27a15ee4fb599e7625 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Wed, 16 Sep 2026 22:02:39 +0100 Subject: [PATCH] getdeps: raise cachelib and fbthrift job weight to 3072 MiB job_weight_mib is the per-compiler memory estimate getdeps divides available RAM by to pick the build concurrency, and the base of the RLIMIT_AS safety net it puts on each build process. cachelib and fbthrift declared 2048 MiB, which two measured builds show is low. Peak resident memory of every cc1plus process was sampled every two seconds during full builds on Fedora 44 (aarch64, gcc 15), once at four jobs and once at two jobs with tests disabled; 1182 compiler processes were observed across the fbthrift and cachelib phases of the second run: | percentile | peak RSS | |------------|----------| | p50 | 489 MiB | | p90 | 1321 MiB | | p95 | 1626 MiB | | p99 | 2580 MiB | | max | 4027 MiB | 24 translation units exceeded 2048 MiB and 4 exceeded 3072 MiB. The heaviest were cachebench's Stressor.cpp (4.0 GiB) and fbthrift's ThriftServer.cpp (3.8 GiB), ThriftQuicServer.cpp (3.1 GiB), ThriftRocketServerHandler.cpp and Cpp2Connection.cpp (2.8 GiB each). 3072 MiB matches what proxygen, fboss, openr, bgp and moxygen already declare and keeps a builder sized for N jobs from over-committing when several of the heavy units land together, which on a machine whose scratch dir sits on a tmpfs was enough to push it into swap. The weight is a typical-case budget rather than a ceiling, so the remaining 4 GiB outliers are left to the 10x RLIMIT_AS margin. fbthrift-python builds the same sources and moves with fbthrift. Co-Authored-By: Claude Fable 5.1 Signed-off-by: Michel Lind --- build/fbcode_builder/manifests/cachelib | 2 +- build/fbcode_builder/manifests/fbthrift | 2 +- build/fbcode_builder/manifests/fbthrift-python | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/fbcode_builder/manifests/cachelib b/build/fbcode_builder/manifests/cachelib index 33f655d75..f45349765 100644 --- a/build/fbcode_builder/manifests/cachelib +++ b/build/fbcode_builder/manifests/cachelib @@ -10,7 +10,7 @@ repo_url = https://github.com/facebook/cachelib.git [build] builder = cmake subdir = cachelib -job_weight_mib = 2048 +job_weight_mib = 3072 [dependencies] zlib diff --git a/build/fbcode_builder/manifests/fbthrift b/build/fbcode_builder/manifests/fbthrift index c16181c0a..b0388c01c 100644 --- a/build/fbcode_builder/manifests/fbthrift +++ b/build/fbcode_builder/manifests/fbthrift @@ -15,7 +15,7 @@ fbthrift = thrift/lib/rust [build] builder = cmake -job_weight_mib = 2048 +job_weight_mib = 3072 [cmake.defines] # Each dependency has its own prefix here, so record their lib dirs too; diff --git a/build/fbcode_builder/manifests/fbthrift-python b/build/fbcode_builder/manifests/fbthrift-python index 3f3194d97..3245c7260 100644 --- a/build/fbcode_builder/manifests/fbthrift-python +++ b/build/fbcode_builder/manifests/fbthrift-python @@ -15,7 +15,7 @@ fbthrift = thrift/lib/rust [build] builder = cmake -job_weight_mib = 2048 +job_weight_mib = 3072 [build.not(os=linux)] builder = nop