Skip to content

bench: time each gap-ack input on its own - #4407

Open
larseggert wants to merge 1 commit into
mainfrom
bench-gap-ack-per-iteration
Open

larseggert wants to merge 1 commit into
mainfrom
bench-gap-ack-per-iteration

Conversation

@larseggert

Copy link
Copy Markdown
Collaborator

Dropping a batch of grown trackers at once lets glibc trim the heap, which the next timed batch then faults back in.

@larseggert
larseggert marked this pull request as ready for review November 23, 2026 15:20
Copilot AI balanced review requested due to automatic review settings November 23, 2026 15:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the benchmark’s per-iteration timing adjustment.

No open issues 🎉

What changed in this PR

Updates the transport range-tracker benchmark to reduce timing noise caused by freeing large batches of trackers.

Changes:

  • Switches mark_acked_gap_empty_covered from BatchSize::SmallInput to BatchSize::PerIteration.
  • Adds a comment explaining how batch deallocation can trigger glibc heap trimming and page faults during subsequent timed work.
File Description
neqo-transport/​benches/​range_tracker.rs Times each gap-ack input separately and documents the allocator-related rationale.

Review effort: Balanced

@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (6ae0599) to head (ca10b95).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4407   +/-   ##
=======================================
  Coverage   96.61%   96.62%           
=======================================
  Files         118      118           
  Lines       43894    43894           
  Branches    43894    43894           
=======================================
+ Hits        42410    42412    +2     
+ Misses       1463     1461    -2     
  Partials       21       21           
Flag Coverage Δ
freebsd 94.12% <ø> (+10.33%) ⬆️
linux 96.76% <ø> (-0.02%) ⬇️
macos 94.50% <ø> (ø)
windows 94.57% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
neqo-common 99.33% <ø> (+0.04%) ⬆️
neqo-http3 96.00% <ø> (ø)
neqo-qpack 96.55% <ø> (ø)
neqo-transport 97.13% <ø> (ø)
neqo-udp 87.63% <ø> (ø)
mtu 91.31% <ø> (ø)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings.

@github-actions

Copy link
Copy Markdown
Contributor

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to main at c46d346.

neqo-pr as clientneqo-pr as server
neqo-pr vs. aioquic: baseline result missing
neqo-pr vs. go-x-net: run cancelled after 20 min
neqo-pr vs. haproxy: run cancelled after 20 min
neqo-pr vs. kwik: 🚀M ⚠️S R 🚀Z L1 🚀L2 C1 🚀V2
neqo-pr vs. linuxquic: baseline result missing
neqo-pr vs. lsquic: L1 C1
neqo-pr vs. msquic: A L1 C1
neqo-pr vs. mvfst: run cancelled after 20 min
neqo-pr vs. neqo: baseline result missing
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: baseline result missing
neqo-pr vs. picoquic: run cancelled after 20 min
neqo-pr vs. quic-go: A
neqo-pr vs. quic-zig: run cancelled after 20 min
neqo-pr vs. quiche: BP BA
neqo-pr vs. quinn: run cancelled after 20 min
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: run cancelled after 20 min
neqo-pr vs. xquic: Z A 🚀L1 C1 BP
aioquic vs. neqo-pr: run cancelled after 20 min
chrome vs. neqo-pr: baseline result missing
go-x-net vs. neqo-pr: run cancelled after 20 min
kwik vs. neqo-pr: CM
lsquic vs. neqo-pr: ⚠️L1
msquic vs. neqo-pr: 🚀C1 CM
mvfst vs. neqo-pr: H DC LR C20 M S R Z 3 B U E A L1 L2 C1 C2 6 V2 BP BA CM
neqo vs. neqo-pr: baseline result missing
openssl vs. neqo-pr: baseline result missing
quic-go vs. neqo-pr: run cancelled after 20 min
quic-zig vs. neqo-pr: run cancelled after 20 min
quiche vs. neqo-pr: run cancelled after 20 min
quinn vs. neqo-pr: V2 CM
rama vs. neqo-pr: baseline result missing
s2n-quic vs. neqo-pr: CM
tquic vs. neqo-pr: run cancelled after 20 min
xquic vs. neqo-pr: M CM
All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

@codspeed

codspeed Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 0.6%

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
❌ 2 regressed benchmarks
✅ 98 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime neqo-neqo-cubic 25.5 ms 26.4 ms -3.52%
❌ Walltime walltime/pacing-true/varying-seeds 3.8 ms 3.9 ms -2.85%
⚡ Walltime walltime/pacing-false/same-seed 3.4 ms 3.3 ms +4.79%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing bench-gap-ack-per-iteration (ca10b95) with main (c46d346)

Open in CodSpeed

@github-actions

Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to c46d346.

No significant performance differences.

Table above only shows statistically significant changes. See all results below.

All results

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server Mean±σ Min–Max Median±MAD MiB/s±σ ΔMedian
google-google 158.9 ± 0.4 157.6 – 159.9 159.0 ± 0.4 201.3 ± 0.6
google-neqo-cubic 79.8 ± 0.4 78.8 – 81.1 79.8 ± 0.4 401.0 ± 2.2 +0.7 (+0.9%)
neqo-google-cubic ⚠️ 237.7 ± 35.9 203.5 – 334.7 208.7 ± 6.4 134.6 ± 20.4 +0.4 (+0.2%)
neqo-neqo-cubic 24.0 ± 0.2 23.6 – 24.7 24.1 ± 0.2 1332.0 ± 9.8 +0.1 (+0.5%)
neqo-neqo-cubic-nopacing 23.4 ± 0.1 23.1 – 23.9 23.4 ± 0.1 1366.7 ± 8.5 -0.0 (-0.1%)
neqo-neqo-newreno 24.0 ± 0.2 23.6 – 24.5 24.0 ± 0.2 1332.7 ± 10.6 +0.0 (+0.1%)
neqo-neqo-newreno-nopacing 23.3 ± 0.1 22.9 – 23.8 23.3 ± 0.1 1372.7 ± 6.8 -0.1 (-0.2%)
neqo-quiche-cubic 35.5 ± 0.4 34.9 – 36.5 35.5 ± 0.3 900.7 ± 9.0 +0.1 (+0.1%)
neqo-s2n-cubic 45.2 ± 0.2 44.7 – 45.6 45.3 ± 0.3 707.2 ± 3.2 -0.1 (-0.2%)
quiche-neqo-cubic 36.4 ± 0.5 35.3 – 37.7 36.4 ± 0.3 879.5 ± 11.1 +0.1 (+0.3%)
quiche-quiche 42.6 ± 0.2 42.0 – 43.3 42.6 ± 0.2 751.1 ± 3.9
s2n-neqo-cubic 126.3 ± 0.5 125.4 – 128.7 126.3 ± 0.3 253.3 ± 1.0 -0.0 (-0.0%)
s2n-s2n ⚠️ 179.4 ± 25.0 147.7 – 273.9 171.9 ± 2.1 178.4 ± 24.8

Download data for profiler.firefox.com or download performance comparison data.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

No significant performance differences relative to c46d346.

All results
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500
       time:   [62.997 ms 63.028 ms 63.059 ms]
       thrpt:  [1.5487 GiB/s 1.5494 GiB/s 1.5502 GiB/s]
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) low mild
1 (1.00%) high mild
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500
       time:   [61.433 ms 61.478 ms 61.524 ms]
       thrpt:  [1.5873 GiB/s 1.5885 GiB/s 1.5896 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500
       time:   [3.8023 ms 3.8032 ms 3.8041 ms]
       thrpt:  [262.88   B/s 262.94   B/s 263.00   B/s]
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500
       time:   [87.867 ms 88.025 ms 88.185 ms]
       thrpt:  [113.40 Kelem/s 113.60 Kelem/s 113.81 Kelem/s]
streams-flow-controlled/walltime/1-streams/each-4194304-bytes
       time:   [13.175 ms 13.180 ms 13.185 ms]
       thrpt:  [303.36 MiB/s 303.49 MiB/s 303.61 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams-flow-controlled/walltime/10-streams/each-1048576-bytes
       time:   [36.129 ms 36.180 ms 36.228 ms]
       thrpt:  [276.03 MiB/s 276.40 MiB/s 276.78 MiB/s]
streams/walltime/1-streams/each-1000-bytes
       time:   [161.18 µs 161.86 µs 162.73 µs]
       thrpt:  [5.8605 MiB/s 5.8919 MiB/s 5.9167 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams/walltime/1000-streams/each-1-bytes
       time:   [4.7670 ms 4.7691 ms 4.7713 ms]
       thrpt:  [204.68 KiB/s 204.77 KiB/s 204.86 KiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) low mild
streams/walltime/1000-streams/each-1000-bytes
       time:   [15.320 ms 15.328 ms 15.335 ms]
       thrpt:  [62.188 MiB/s 62.219 MiB/s 62.251 MiB/s]
Found 4 outliers among 100 measurements (4.00%)
3 (3.00%) low mild
1 (1.00%) high mild
transfer/walltime/pacing-false/same-seed
       time:   [3.2574 ms 3.2590 ms 3.2610 ms]
       thrpt:  [1.1979 GiB/s 1.1986 GiB/s 1.1992 GiB/s]
transfer/walltime/pacing-false/varying-seeds
       time:   [3.4885 ms 3.4898 ms 3.4910 ms]
       thrpt:  [1.1189 GiB/s 1.1193 GiB/s 1.1197 GiB/s]
Found 11 outliers among 100 measurements (11.00%)
1 (1.00%) low mild
9 (9.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-true/same-seed
       time:   [3.9803 ms 3.9816 ms 3.9830 ms]
       thrpt:  [1004.3 MiB/s 1004.6 MiB/s 1004.9 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/walltime/pacing-true/varying-seeds
       time:   [3.8348 ms 3.8396 ms 3.8461 ms]
       thrpt:  [1.0157 GiB/s 1.0174 GiB/s 1.0186 GiB/s]

Instructions per cycle

Criterion reported no significant timing changes.

All benchmarks
Benchmark IPC before IPC after ΔIPC
streams-flow-controlled/walltime/10-streams/each-1048576-bytes 3.13 3.08 -1.4%
transfer/walltime/pacing-false/varying-seeds 2.85 2.88 +1.0%
streams-flow-controlled/walltime/1-streams/each-4194304-bytes 2.96 2.93 -0.9%
transfer/walltime/pacing-true/varying-seeds 2.86 2.88 +0.7%
transfer/walltime/pacing-true/same-seed 2.88 2.87 -0.5%
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 3.10 3.12 +0.5%
streams/walltime/1000-streams/each-1000-bytes 2.96 2.95 -0.4%
transfer/walltime/pacing-false/same-seed 2.86 2.87 +0.4%
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 3.03 3.02 -0.3%
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 2.25 2.25 -0.1%
streams/walltime/1-streams/each-1000-bytes 2.57 2.58 +0.1%
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 3.21 3.21 -0.1%
streams/walltime/1000-streams/each-1-bytes 3.28 3.28 +0.0%
Profiles for profiler.firefox.com (64)

Download data for profiler.firefox.com or download performance comparison data.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants