Performance regression in d49635a71351 (#15365) (are-we-fast-yet run 00168)

Đang mở
#15,453 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

awfy performance

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.

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

https://github.com/bytecodealliance/wasmtime/compare/08cca2243427ac669cf384259d545ba71a9f06d2...d49635a71351df82f3320095801848d8f128b938

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
Ngôn ngữ chính
Rust
Star
18.9k
Fork
2k
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
238

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bytecodealliance/wasmtime

Tất cả issue của bytecodealliance/wasmtime

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.