From 9764815cc3c7b016bbbdc35ced1af4a014d846fe Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Sat, 22 Aug 2026 08:24:50 +0200 Subject: [PATCH] rig-build: -j12, and a deps image that has wxInspector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raises the bound from -j8 to -j12: the incident dump measured 1.17 GB average per cc1plus, so 12 in flight is ~14 GB typical, well inside the 40 GB cgroup ceiling that is the real guarantee. Keeps the file byte-identical to snaporca's copy, which the header requires. Dockerfile.deps builds the deps with -j 12 for the same reason, and symlinks deps/build/destdir -> deps/build/OrcaSlicer_dep: this tree installs under the latter name while the orcacad_buildcache volume has the former baked as absolute paths in its CMakeCache. Same tree, two names — without the link, one directory rename costs a full cold rebuild. --- scripts/Dockerfile.deps | 12 +++++++++++- scripts/rig-build.sh | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/Dockerfile.deps b/scripts/Dockerfile.deps index a73993fb64..d5d89773fd 100644 --- a/scripts/Dockerfile.deps +++ b/scripts/Dockerfile.deps @@ -67,4 +67,14 @@ RUN ./build_linux.sh -u # Pinned dependencies in ./deps (OCCT 7.6 with ModelingAlgorithms enabled, OpenCV, # OpenVDB, Boost, wxWidgets, ...). This is the long step; it is baked into the image. -RUN ./build_linux.sh -dr +# -j 12, not the default all-cores: on 2026-08-21 an unbounded deps build plus an unbounded +# app build put 42 GB of cc1plus on a 62 GB box and OOM-killed the host for 2h28m. 12 keeps +# the compile fast while leaving the machine usable. Pair with `docker build --memory`. +RUN ./build_linux.sh -dr -j 12 + +# Compatibility symlink. This deps tree installs into deps/build/OrcaSlicer_dep/, while the +# orcacad_buildcache volume was configured against the previous image, whose prefix was +# deps/build/destdir/. Those paths are baked as absolute strings into the app's CMakeCache, so +# without this symlink a rebuild on the new image reconfigures from scratch — hours of compile +# to change one directory name. Same tree, two names. +RUN ln -sfn /OrcaSlicer/deps/build/OrcaSlicer_dep /OrcaSlicer/deps/build/destdir diff --git a/scripts/rig-build.sh b/scripts/rig-build.sh index e749fff298..72e9fc3ace 100755 --- a/scripts/rig-build.sh +++ b/scripts/rig-build.sh @@ -42,13 +42,13 @@ fi # build produced a single object. The bounds, weakest to strongest: # flock — the lock path is shared by both forks on purpose, so they SERIALISE instead of # summing. Peak is one build's worth no matter who else starts one. -# -j8 — ~8 TUs in flight, ~10-20 GB, and the box stays usable while it compiles. -# JOBS=n overrides for a machine with more headroom. +# -j12 — measured 1.17 GB average per cc1plus in the incident dump, so 12 in flight +# is ~14 GB typical and leaves the box usable. JOBS=n overrides. # --memory — the actual guarantee. A runaway build hits its own cgroup limit and dies alone; # the host never reaches global OOM again, whatever -j or flock do. # --memory-swap equal to --memory forbids swap, which is what made ssh hang. -JOBS="${JOBS:-8}" -MEM="${MEM:-32g}" +JOBS="${JOBS:-12}" +MEM="${MEM:-40g}" LOCK=/tmp/orca-rig-build.lock exec 9>"$LOCK"