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
ENH: Limit CI build and test parallelism to match available vCPUs
Oversubscribing parallel jobs on CI runners causes several problems:
- ITK's template-heavy C++ compilations each consume 1-2 GB of RAM;
launching more parallel compiler instances than vCPUs on
memory-constrained runners (e.g., 4 Ninja jobs on a 2-vCPU/7 GB
Azure agent) risks OOM kills and thrashing that slow the build.
- CI VMs share physical hosts with other tenants, so excess parallelism
contends for shared CPU, cache, and memory bandwidth, yielding
diminishing returns and unpredictable wall-clock times.
- Context-switch overhead on oversubscribed vCPUs wastes cycles on
scheduling rather than compilation, increasing overall build time.
Set CTEST_BUILD_FLAGS and ctest -j to the actual vCPU count for each
runner: 2 for Azure Standard_DS2_v2 (7 GB), 3 for Azure/GitHub
macOS-15 (14 GB), and 4 for GitHub ubuntu-24.04-arm (16 GB).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments