Performance regression in d49635a71351 (#15365) (are-we-fast-yet run 00168)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- performance
Direzione di ricerca
Start with commit d49635a71351 and its PC-lookup changes for guest debugging, then reproduce using the sightglass commands to build old/new Wasmtime engines and benchmark dotnet-raytracer.wasm. Read docs/regressions.md first: instructions retired moved only +1.19% while cycles moved +2.37% and branch misses spiked, so check whether this is callgrind aliasing or a real execution slowdown. Done means the regression is gone or convincingly explained, with a rerun of the benchmark.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
are-we-fast-yet found 1 regression and 1 speedup in virtual cycles (callgrind) between Wasmtime 08cca2243427 and d49635a71351.
The range is the single commit d49635a71351 Guest debugging: fix PC lookups to find store-invariant (engine-code) trampolines too. (#15365), so it is blamed without bisecting. See the bisect.
- Baseline: run 00167 (metadata), Wasmtime
08cca2243427 - This run: run 00168 (metadata), Wasmtime
d49635a71351
A change counts when a Mann-Whitney U test finds it significant at the 0.01 level and it clears its phase's minimum relative change:
| phase | geomean | individual |
|---|---|---|
| compilation | 0.3% | 1% |
| instantiation | 2.5% | 20% |
| execution | 0.5% | 2% |
Regressions (1)
| benchmark | phase | Δ virtual cycles | virtual cycles noise | Δ instructions retired | instructions retired noise |
|---|---|---|---|---|---|
dotnet-raytracer/dotnet-raytracer.wasm |
execution | +2.37% (+2.35% to +2.39%) | 0.024% -> 0.022% | +1.19% | 0.003% -> 0.003% |
Speedups (1)
| benchmark | phase | Δ virtual cycles | virtual cycles noise | Δ instructions retired | instructions retired noise |
|---|---|---|---|---|---|
hashset/benchmark.wasm |
execution | -2.38% (-2.42% to -2.34%) | 0.041% -> 0.043% | +0.00% | 0.007% -> 0.008% |
A positive delta is a slowdown, a negative delta is a speedup.
instructions retired counts work done rather than how well it was predicted. A regression whose instructions didn't move is often Valgrind's branch predictors aliasing on a code layout change; see docs/regressions.md.
Each noise column is how far that event's own counts spread.
Other callgrind counters that changed for these benchmarks
| benchmark | phase | counter | Δ | noise |
|---|---|---|---|---|
dotnet-raytracer/dotnet-raytracer.wasm |
execution | conditional-branch-misses |
+29.01% (+28.99% to +29.02%) | 0.017% -> 0.013% |
dotnet-raytracer/dotnet-raytracer.wasm |
execution | l1-icache-misses |
+25.18% (+24.74% to +25.61%) | 0.387% -> 0.420% |
dotnet-raytracer/dotnet-raytracer.wasm |
execution | indirect-branch-misses |
+23.31% (+23.30% to +23.33%) | 0.014% -> 0.014% |
dotnet-raytracer/dotnet-raytracer.wasm |
execution | l1-dcache-read-misses |
-3.83% (-17.24% to -1.74%) | 18.117% -> 3.047% |
dotnet-raytracer/dotnet-raytracer.wasm |
execution | indirect-branches |
+3.77% (+3.77% to +3.77%) | 0.001% -> 0.002% |
dotnet-raytracer/dotnet-raytracer.wasm |
execution | data-writes |
+2.17% (+2.17% to +2.18%) | 0.002% -> 0.002% |
Commits
Reproduce locally
On x86-64 Linux with Valgrind installed:
git clone https://github.com/bytecodealliance/sightglass
cd sightglass
git checkout 2d453335318d05cf42b6f3263aa68f0021985f10
rustc engines/wasmtime/build.rs -o build-engine
mkdir old new
REVISION=08cca2243427ac669cf384259d545ba71a9f06d2 ./build-engine old
REVISION=d49635a71351df82f3320095801848d8f128b938 ./build-engine new
cargo run --release -- benchmark --measure callgrind \
--engine old/libengine.so --engine new/libengine.so \
--engine-flags-common="-Cparallel-compilation=n --target x86_64-unknown-linux-gnu -Ccranelift-has-sse3 -Ccranelift-has-ssse3 -Ccranelift-has-sse41 -Ccranelift-has-sse42 -Ccranelift-has-popcnt -Ccranelift-has-avx -Ccranelift-has-avx2 -Ccranelift-has-fma -Ccranelift-has-bmi1 -Ccranelift-has-bmi2 -Ccranelift-has-lzcnt -Ccranelift-has-cmpxchg16b" \
-- benchmarks/dotnet-raytracer/dotnet-raytracer.wasm
- Lingua principale
- Rust
- Stelle
- 18.9k
- Fork
- 2k
- Merge medio
- 1g 6h
- PR unite (30g)
- 238
Preparare l'ambiente
- 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 bytecodealliance/wasmtime
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bytecodealliance/wasmtime#15536 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bytecodealliance/wasmtime#15455 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
wasi-preview1-component-adapter: fd_write does not invalidate cached InputStream, causing stale readsForse già presa @dpfens l’ha presa 13 giorni fa. Apertawasi
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bytecodealliance/wasmtime#15296 ·
I maintainer di solito rispondono entro 1 giorno
-
bug wasm-proposal:exceptions wasmtime:debugging
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bytecodealliance/wasmtime#14102 ·
I maintainer di solito rispondono entro 1 giorno
-
wasm-proposal:gc
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bytecodealliance/wasmtime#13808 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di bytecodealliance/wasmtime
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area: plugins bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
clipy-recorder/clipy#1039 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
valkey-io/valkey-glide#7975 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
gofractally/psibase#2379 ·
I maintainer di solito rispondono entro 3 giorni
-
Qwen stream parser: a chunk with "error": null is treated as a stream errorForse già presa @Beehtrix l’ha presa oggi. Apertaarea:models bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
brekkylab/ailoy#681 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni