Bound MSBuild compiler-process concurrency in the Windows CI build#6446
Bound MSBuild compiler-process concurrency in the Windows CI build#6446Fedr wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…risons Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Closing: the multi-tool-task setup does not bring faster Build times on the GitHub-hosted Windows runners. Same-CPU comparison (AMD EPYC 7763, Build step, full matrix): with The mechanism stays in MeshInspector CI, where a high-vCPU runner measurably profits from the build-wide cap. The unrelated fix this PR uncovered (unsigned/signed EXPECT_EQ comparisons in MRMeshBuilderTests.cpp) is pushed to master directly as 7dd8afd. |
Summary
Bound MSBuild's compiler-process concurrency in every CI step that invokes
msbuild, by settingUseMultiToolTask=trueandEnforceProcessCountAcrossBuilds=trueas job-level environment variables (MSBuild picks environment variables up as global properties).Plain
msbuild -m+/MPgives no build-wide bound: every concurrently-building project independently fans itscl.exeprocesses out to the core count, so total compiler processes can reach projects-in-flight x cores, oversubscribing the runner's CPU and memory. With multi-tool-task scheduling and cross-build enforcement, all projects draw from one machine-wide pool limited to the core count (theMultiProcMaxCountdefault, deliberately not overridden here).Covered call sites:
build-test-windows.yml— the solution build plus the MeshLibC2 / MeshLibC2Cuda C-bindings builds (job-level env)pip-build.yml— the Windows wheel's solution buildupdate-win-version.yml— the example_plugin smoke buildsThe env vars are inert everywhere else they're visible: CMake/Ninja legs schedule through a single job pool already, and
dotnet buildsteps compile C#, not C++.In MeshInspector CI, the same mechanism (there with an explicit process cap) made the Release MSBuild Build steps 23-26% faster on a 28-vCPU runner while also bounding peak commit charge; GitHub-hosted runners have the same oversubscription pattern at a smaller scale.
Test plan