[xharness] Prototype parallel simulator variation builds - #26442
Conversation
Use a parent MSBuild invocation with BuildInParallel and /m so MSBuild controls concurrency across cloned simulator variation projects. Keep restores and simulator execution serialized, and preserve per-variation build results. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Commenter does not have sufficient privileges for PR 26442 in repo dotnet/macios |
This comment has been minimized.
This comment has been minimized.
Performance validationThe full validation build completed successfully: Azure build 14955876. All 19
The aggregate build binlog itself was 25:22.7 wall-clock, preceded by a 16.9-second serialized restore. Cumulative work inside that parallel interval was dominated by:
Those totals overlap across MSBuild nodes and are not wall-clock durations. Process snapshots confirm that MSBuild concurrently drove AOT/LLVM, Csc, linker, and native compilation. During the build, the sampled load averages were The simulator portion is still serial. Its approximately three-minute increase is outside the changed build phase and is not enough from one sample to establish a regression. XHarness also spends roughly 25 seconds after the aggregate build running per-variation property evaluation before simulator selection; these are short evaluations, not rebuilds. Recommendation: continue with this approach. The first full CI sample cut variation-build wall time by 56% and the complete job by 25%, while preserving the serial simulator execution and per-variation result handling. Before considering the performance result final, run a few additional samples to quantify agent/test variance and watch memory pressure under concurrent linker/AOT workloads. |
This comment has been minimized.
This comment has been minimized.
Additional samples: correctness regression reproducedThe two additional runs do not support merging the current prototype:
That is five AOT/assembly consistency failures across the two added samples. These are startup-time native aborts, not simulator provisioning or test assertion failures. The original validation run passed, so the failure is nondeterministic. The aggregate binlogs show the performance benefit remains real: the two new However, the one parent Updated recommendation: do not merge the current implementation. The earlier recommendation is withdrawn until build isolation is corrected and repeated runs are clean. |
Multi-sample summary correctionCorrection to the arithmetic in the previous comment: the aggregate-build durations were:
The range is 20:43.6–25:22.7 (4:39.1), and the mean is 59.3% faster than the 58:28.8 baseline—not 58.7% as stated previously. The failed runs' total job and simulator durations are not valid performance comparisons because startup crashes shortened some variations. The aggregate build timing remains useful because all 19 builds completed before execution began. Binlog variability also indicates contention: the longest AOT invocation ranged from 3:58.6 to 6:34.6 across the added samples. Final conclusion remains unchanged: the speedup is substantial, but a 33% clean-run rate is unacceptable. Preserve top-level variation parallelism while disabling nested per-variation graph parallelism, then resample. |
🔥 [CI Build #1e9ff6f] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 2 tests failed, 200 tests passed. Failures❌ linker tests (iOS)1 tests failed, 14 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (iOS)1 tests failed, 18 tests passed.Failed tests
Html Report (VSDrops) Download ❌ windows tests🔥 Failed catastrophically on VSTS: test results - windows (no summary found). Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
|
Additional root-cause analysis of the AOT/managed assembly mismatches: The aggregate build is the cause boundary, but not because projects share
So the prototype multiplied two levels of parallelism that were never concurrent before: MSBuild project parallelism x per-project AOT parallelism. The resulting AOT/native artifacts are occasionally inconsistent with their managed inputs. The available artifacts prove that concurrency boundary, but do not identify whether the final corruption is a Mono AOT compiler defect under this load or resource-pressure-induced corruption inside the native pipeline. I do not recommend trying to fix this with |
This is an experimental change to measure whether MSBuild-controlled parallelism improves the
monotouch_iossimulator test job.The current XHarness flow schedules all variation builds together, but every
MSBuildTaskacquires the desktop resource exclusively, so the 19 builds execute sequentially. In build 14886909 this phase took 58.5 minutes, including 28.1 minutes in Mono AOT and 16.4 minutes in Roslyn compilation.This prototype:
dotnet msbuild /mbuild withBuildInParallel="true", allowing MSBuild to choose worker-node concurrency;The purpose of this draft is to compare the build phase, total job duration, CPU utilization, and memory pressure with the 58.5-minute baseline before deciding whether to refine or keep the approach.