Performance regression in d49635a71351 (#15365) (are-we-fast-yet run 00168)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 20/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- performance
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Rust
- 星标
- 18.9k
- 派生
- 2k
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 238
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bytecodealliance/wasmtime 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
bytecodealliance/wasmtime#15536 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
bytecodealliance/wasmtime#15455 · 1 条评论 ·
维护者通常 1 天内回复
-
wasi-preview1-component-adapter: fd_write does not invalidate cached InputStream, causing stale reads可能已有人在做 @dpfens 于 13 天前认领。 未关闭wasi
难度 2/5 1-3 小时 新手友好度 72/100
bytecodealliance/wasmtime#15296 ·
维护者通常 1 天内回复
-
bug wasm-proposal:exceptions wasmtime:debugging
难度 2/5 1-3 小时 新手友好度 76/100
bytecodealliance/wasmtime#14102 ·
维护者通常 1 天内回复
-
wasm-proposal:gc
难度 2/5 1-3 小时 新手友好度 62/100
bytecodealliance/wasmtime#13808 · 2 条评论 ·
维护者通常 1 天内回复
查看 bytecodealliance/wasmtime 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area: plugins bug
难度 2/5 1-3 小时 新手友好度 72/100
clipy-recorder/clipy#1039 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
valkey-io/valkey-glide#7975 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
gofractally/psibase#2379 ·
维护者通常 3 天内回复
-
Qwen stream parser: a chunk with "error": null is treated as a stream error可能已有人在做 @Beehtrix 今天认领。 未关闭area:models bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复