You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limit concurrent link steps to keep load average down during wheel builds #311
Wheel builds on a shared 72-core Linux machine (ITK_BUILD_JOBS=48) push the load average to about 250 during the link phase, then drop back to under 20 within minutes. The job cap does not bound link steps, so other work on the machine (for example a CI runner) stalls. Investigate whether the build should pass link-limiting options to CMake and the linker.
Compiles stay wide while at most M link steps run at once. ITK itself sets no job pools today.
Threads inside each link step. If the toolchain links with lld, mold, or gold, each link can start a thread per core, so a few concurrent links still saturate the machine. Candidates: -Wl,--threads=<k> (lld), -Wl,--thread-count=<k> (mold), -Wl,--no-threads (gold). If LTO is enabled with -flto=auto, cap it (-flto=<k>). First step: confirm which linker and LTO settings the manylinux and macOS builds actually use.
Ninja load limit (ninja -l). ITK_BUILD_LOAD_LIMIT already exists in scripts/build_jobs.py; check that it reaches the Ninja invocation in every build path. It only prevents new jobs from starting, so it complements 1 and 2.
What to measure
For one manylinux_2_28 x86_64 build, with and without each option: peak and mean load average, peak memory, and total wall time. A reasonable default might derive the link pool size from available memory the way compute_build_jobs derives the job count, with an environment override (for example ITK_BUILD_LINK_JOBS).
AI assistance
Tool: Claude Code
Role: observed the load spike during a private wheel build, surveyed the options, and drafted this issue at the author's request.
Activity
ENH: Limit concurrent link steps with a Ninja job pool