Where runtime Helix minutes go, and why WebAssembly is a large share
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- csharp, github-actions, wasm
- Ambito
- ci-cd, performance
Direzione di ricerca
This issue is an informational analysis and does not propose a specific change. It references eng/pipelines/runtime.yml and evaluate-default-paths.yml, plus the Chrome and Wasmtime library-test templates; read those alongside the trigger observations in section B3. The issue offers several options for discussion, but does not identify an agreed action or a completion criterion.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This issue summarizes where dotnet/runtime Helix time went over the last seven days. It explains why WebAssembly accounts for a large share and lists some options that may be worth a closer look. It is informational only and does not propose a specific change.
/cc @lewing @steveisok
Data and method
- Window: Nov 20, 21:47 UTC – Nov 27, 21:47 UTC (7 days).
- Source: Helix
WorkItemsjoined toJobsin theengsrvprod/engineeringdataKusto database. - Scope: Jobs whose source is
dotnet/runtime. This includes PRs, rolling CI, and other builds on every branch. - Measure: Total time that completed work items spent running, from start to finish. It does not measure VM uptime, CPU time, billing, queue wait, or Azure Pipelines build-agent time.
- Counting: Each attempt is counted once. Work that began before the window is counted only from the start of the window.
- WebAssembly: Any Helix job that ran in a
*-helix-webassembly*container, on either Linux or Windows hosts.
A. How dotnet/runtime Helix minutes are spent
| Category | Work items | Minutes | Share | PR minutes | CI minutes |
|---|---|---|---|---|---|
| Windows (not WebAssembly) | 1,332,965 | 2,111,664 | 36.8% | 1,163,795 | 738,527 |
| WebAssembly (browser + WASI) | 313,021 | 1,480,909 | 25.8% | 1,082,460 | 397,028 |
| Linux x64 and other | 852,801 | 758,870 | 13.2% | 351,863 | 219,980 |
| Linux arm64 | 712,804 | 685,811 | 11.9% | 328,158 | 211,027 |
| macOS | 536,577 | 563,575 | 9.8% | 229,210 | 333,189 |
| Android | 61,429 | 139,687 | 2.4% | 70,146 | 69,486 |
| Total | 5,740,516 | 3,225,632 |
WebAssembly is about a quarter of all runtime Helix minutes and about a third (33.6%) of PR minutes. Of the 388 runtime PRs that sent any work to Helix in this window, 358 (92%) ran WebAssembly jobs. Those PRs averaged about 22 WebAssembly Helix jobs each.
B. Why WebAssembly minutes are high
B1. Where the WebAssembly minutes go
| Workload | Minutes | Share of WebAssembly | PRs that ran it | PR minutes per PR | Average minutes per item |
|---|---|---|---|---|---|
| Wasm.Build.Tests (SDK app-build tests) | 602,823 | 40.7% | 93 | ~4,850 | 20.1 |
| Library tests in Chrome | 465,685 | 31.4% | 360 | ~760 | 5.9 |
| Library tests in Wasmtime (WASI) | 182,802 | 12.3% | 330 | ~530 | 1.8 |
CoreCLR runtime tests (src/tests) |
176,833 | 11.9% | 367 | ~370 | 2.3 |
| Library tests in Firefox, V8, and others | 52,766 | 3.6% | 359 | ~130 | — |
By host OS, minutes are split about evenly: ~755k on Windows-hosted containers and ~726k on Linux-hosted containers.
- Windows-hosted Wasm.Build.Tests account for about 488k minutes, the largest single bucket. They average about 30 minutes per work item, compared with about 8.4 minutes per item on Linux.
- Windows-hosted Chrome library tests account for about 205k minutes. They come from
release/10.0andrelease/11.0builds and from PRs. These are mostly Mono jobs (WasmTestOnChrome-ST-*andWasmTestOnChrome-MONO-ST-*).mainno longer has Windows Chrome library-test jobs.
B2. Tests take longer per run under WebAssembly
Median runtime in minutes for passing runs of the same test assembly. The native baseline combines several runtime configurations, so treat these ratios as rough.
| Test assembly | Native Linux x64 | Chrome | Firefox | V8 | Wasmtime |
|---|---|---|---|---|---|
| System.Text.Encodings.Web.Tests | 0.35 | 1.63 | 1.78 | 1.53 | 15.77 |
| System.Collections.Immutable.Tests | 1.05 | 3.54 | 3.75 | 2.15 | 13.75 |
| System.Globalization.Tests | 0.88 | 1.68 | 1.58 | 0.98 | 10.23 |
| System.Linq.Expressions.Tests | 0.48 | 1.67 | 1.57 | 1.90 | 8.36 |
| System.Runtime.Tests | 1.93 | 3.27 | 19.04 | 13.87 | 18.38 |
In browsers, the same tests usually take about 1.5–4× as long as native runs. In Wasmtime they often take 10–45× as long. These durations include host and browser startup and test setup, not just WebAssembly execution.
B3. Pipeline triggers
The following refers to eng/pipelines/runtime.yml and its templates at main commit 5b65c8d4.
-
The
librariespath filter matches almost any change. Inevaluate-default-paths.yml, thelibrariessubset has only an exclude list. It therefore matches most changes outsidesrc/coreclr,src/mono,src/tests, and the other excluded paths. This filter is one of the triggers for both of these jobs:- The CoreCLR Chrome library-test job (
wasm-coreclr-library-tests.yml,scenarios: WasmTestOnChrome). - The CoreCLR Wasmtime library-test job (
wasi-wasm-coreclr-library-tests.yml).
Both templates have a
shouldRunSmokeOnly: onLibrariesAndIllinkChangesmode. In that mode, a change that touches libraries or ILLink but nothing WebAssembly-specific runs only the smoke tests.runtime.ymldoes not use that mode for the main Chrome or Wasmtime jobs, so they run the full suites. Only the_SmokeFirefoxV8,_Smoke_R2R, and WASI_R2Rjobs are smoke-only. - The CoreCLR Chrome library-test job (
-
The
wasm_coreclr_runtimetestsfilter includes all ofsrc/coreclr/*andsrc/tests/*. Any CoreCLR or test change therefore triggers:- The browser and WASI CoreCLR builds.
- The WASI CoreCLR runtime tests, both interpreter and ReadyToRun.
- The browser CoreCLR runtime tests. These also run on any change that matches the
coreclrfilter.
-
Wasm.Build.Tests are triggered rarely but cost a lot per run. The
wasmbuildtestsfilter is narrow, along with the ILLink and dependency-flow triggers. Even so, each run sends about 10 Helix jobs that total about 2,300 minutes, mainly on Windows. Active WebAssembly PRs push many times. For example, #138027 used about 28k Wasm.Build.Tests minutes in this window.- Of the 93 PRs,
dotnet-maestrodependency and code-flow PRs accounted for about 66k of the 451k PR minutes. - A few PRs whose titles don't suggest WebAssembly changes also triggered Wasm.Build.Tests, such as #137944 (PAL cleanup) and #137670 (EventPipe file permissions). It may be worth checking which filter they matched.
- Of the 93 PRs,
-
Rolling builds run every WebAssembly job (
alwaysRun: isRollingBuild). They are already batched and scheduled twice a day. Rolling CI used about 397k WebAssembly minutes in this window.
C. Options that may be worth a closer look
These are listed only for discussion. Each one trades some coverage for fewer minutes, and the WebAssembly owners are best placed to judge whether that trade is acceptable.
- Use smoke-only mode for library-only changes. Pass
shouldRunSmokeOnly: onLibrariesAndIllinkChangesto the main CoreCLR Chrome and Wasmtime library-test jobs. Full runs would still happen on rolling builds, outer loop, and changes that match a WebAssembly-specific filter. On Linux, these two jobs used about 360k PR minutes in this window. - Narrow
wasm_coreclr_runtimetests. Instead of all ofsrc/coreclr/*andsrc/tests/*, it could cover only the WebAssembly-relevant areas, such assrc/coreclr/vm/wasm, the interpreter, the JIT, crossgen2/ReadyToRun, and WebAssembly test infrastructure. This would reduce how often the browser and WASI builds and runtime tests run. - Look at the Windows-hosted Wasm.Build.Tests jobs. Each work item takes about 3.5× as long as on Linux, and these jobs account for about a third of all WebAssembly minutes. Options include running a subset on PRs and the full matrix on rolling builds. Another is reducing the per-run fan-out (the Workloads, Webcil, Fingerprinting, and Bundler combinations).
- Review the slowest Wasmtime suites. Some assemblies run 10–45× slower than native. Splitting, trimming, or moving the heaviest ones to outer loop could help without removing WASI coverage.
- Check why some PRs triggered Wasm.Build.Tests. Some PRs that seem unrelated to WebAssembly did, as noted in B3.3.
- Review release-branch Windows Chrome (Mono) jobs. They used about 205k minutes this week in
release/10.0andrelease/11.0, through rolling builds and PRs.
Queries are available on request.
- Lingua principale
- C#
- Stelle
- 18.5k
- Fork
- 5.8k
- Merge medio
- 2g 8h
- PR unite (30g)
- 597
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/runtime
-
area-VM-meta-mono untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
area-Debugger-mono untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
dotnet/runtime#138494 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area-AssemblyLoader-mono untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dotnet/runtime#138493 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
JsonConsoleFormatter throws on NaN and infinite double and float values, failing the log callForse già presa @Mohamedadel-prog l’ha presa 2 giorni fa. Apertaarea-Extensions-Logging untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
dotnet/runtime#138418 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area-System.IO untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dotnet/runtime#138417 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/runtime
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
juandresrodca/AdminForge#69 ·
I maintainer di solito rispondono entro 1 giorno
-
Keep PublicAPI.Unshipped.txt sorted, with a guard, so concurrent API PRs stop conflicting on itApertachore small tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
BattletechModders/ModTek#256 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Facepunch/sbox-public#12484 ·
I maintainer di solito rispondono entro 2 giorni