perf(linux): full make -j per parallel config (no //nconfigs split)

Splitting make -j across configs (jobs // nconfigs) made each parallel
config single-threaded on a 4-vCPU VM, so 3 concurrent serial builds
were as slow as the old sequential path (~7min). Windows (MSBuild)
runs the 3 configs in parallel each using all cores and finishes in
~2min on the same vCPU/RAM. Mirror that: give every parallel config
the full make -j; the scheduler absorbs the mild oversubscription.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 21:26:23 +02:00
parent c6e74909b4
commit ea71e0d8b2
+8 -3
View File
@@ -350,9 +350,14 @@ def main() -> int:
wanted = list(CONFIGS.keys()) if "all" in args.configs else args.configs wanted = list(CONFIGS.keys()) if "all" in args.configs else args.configs
if args.parallel and len(wanted) > 1: if args.parallel and len(wanted) > 1:
# Split make jobs across configs so 3 concurrent makes don't # Each config gets the FULL make -j (no //nconfigs split). The
# oversubscribe the CPU (mirrors the Windows parallel build). # configs are independent; mild CPU oversubscription is handled
per_jobs = max(1, jobs // len(wanted)) # by the scheduler and is still far faster than serial — this is
# exactly what the Windows (MSBuild) parallel build does, which
# finishes in ~2min on the same vCPU/RAM. Splitting -j across
# configs neutered intra-config parallelism (on a 4-vCPU VM it
# became make -j1) and gave no speedup.
per_jobs = jobs
print( print(
f"[linux] Building {len(wanted)} configs in parallel " f"[linux] Building {len(wanted)} configs in parallel "
f"(make -j{per_jobs} each)" f"(make -j{per_jobs} each)"