Repository navigation
bench: time steady-state write_frames in send_streams - #4409
larseggert wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4409 +/- ##
=======================================
Coverage 96.61% 96.62%
=======================================
Files 118 118
Lines 43894 43894
Branches 43894 43894
=======================================
+ Hits 42410 42411 +1
+ Misses 1463 1462 -1
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
🟡 Changes recommended
The benchmark’s single warm-up packet cannot drain all 4000 initial bytes, leaving untouched streams to perform first-send range allocation during the timed pass instead of measuring steady-state sends.
1 open issue
What changed in this PR
This PR updates the transport send-stream benchmarks to target steady-state write_frames performance, with data already in flight rather than measuring a stream’s first send.
Changes:
- Adds an untimed warm-up helper that sends queued data and queues another payload.
- Applies warm-up to regular, fair, grouped, and send-ordered stream setups.
| File | Description |
|---|---|
neqo-transport/benches/send_streams.rs |
Adds shared stream-ID and warm-up helpers for steady-state benchmark setup. |
Review effort: Balanced
| /// Sends the queued data once, untimed, and queues `DATA` again on the `active` streams. The timed | ||
| /// call then extends each stream's sent range, as on a long-lived stream, rather than allocating | ||
| /// the first one. | ||
| fn steady_state<I: IntoIterator<Item = StreamId>>(ss: SendStreams, active: I) -> SendStreams { | ||
| let mut input = with_builder(ss); | ||
| do_write_frames(&mut input); | ||
| let mut ss = input.0; |
| /// the first one. | ||
| fn steady_state<I: IntoIterator<Item = StreamId>>(ss: SendStreams, active: I) -> SendStreams { | ||
| let mut input = with_builder(ss); | ||
| do_write_frames(&mut input); |
There was a problem hiding this comment.
Warning
In 20-fair-streams all-active, the warm-up pass cannot drain all streams. The timed call is then not steady state.
packet::LIMIT is 2048 bytes and each STREAM frame is about 204 bytes, so the warm-up sends only about 9 of the 20 streams. The timed call resumes at fair_rr_next, on streams that have never sent and now hold 400 bytes. It allocates first sent ranges, which is what this change wants to keep out of the timing. Loop do_write_frames with fresh builders until no stream has data, then re-queue.
Failed Interop TestsQUIC Interop Runner, client vs. server, differences relative to
All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-pr as client
neqo-pr as server
Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-pr as client
neqo-pr as server
|
Merging this PR will regress 7 benchmarks1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
Client/server transfer resultsPerformance differences relative to c46d346. No significant performance differences. Table above only shows statistically significant changes. See all results below. All resultsTransfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
Download data for |
Benchmark resultsNo significant performance differences relative to c46d346. All resultstransfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 time: [61.103 ms 61.145 ms 61.187 ms]
thrpt: [1.5960 GiB/s 1.5971 GiB/s 1.5982 GiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildtransfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 time: [61.966 ms 62.017 ms 62.068 ms]
thrpt: [1.5734 GiB/s 1.5747 GiB/s 1.5760 GiB/s]transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 time: [3.8069 ms 3.8080 ms 3.8090 ms]
thrpt: [262.54 B/s 262.61 B/s 262.68 B/s]
Found 6 outliers among 100 measurements (6.00%)
5 (5.00%) high mild
1 (1.00%) high severetransfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 time: [88.197 ms 88.356 ms 88.512 ms]
thrpt: [112.98 Kelem/s 113.18 Kelem/s 113.38 Kelem/s]streams-flow-controlled/walltime/1-streams/each-4194304-bytes time: [13.117 ms 13.124 ms 13.130 ms]
thrpt: [304.64 MiB/s 304.78 MiB/s 304.94 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) low severestreams-flow-controlled/walltime/10-streams/each-1048576-bytes time: [35.993 ms 36.045 ms 36.094 ms]
thrpt: [277.05 MiB/s 277.43 MiB/s 277.83 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) low mildstreams/walltime/1-streams/each-1000-bytes time: [161.77 µs 162.45 µs 163.32 µs]
thrpt: [5.8392 MiB/s 5.8707 MiB/s 5.8953 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildstreams/walltime/1000-streams/each-1-bytes time: [4.7825 ms 4.7844 ms 4.7863 ms]
thrpt: [204.03 KiB/s 204.11 KiB/s 204.20 KiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) low mildstreams/walltime/1000-streams/each-1000-bytes time: [15.291 ms 15.297 ms 15.302 ms]
thrpt: [62.323 MiB/s 62.345 MiB/s 62.367 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mildtransfer/walltime/pacing-false/same-seed time: [3.4490 ms 3.4503 ms 3.4518 ms]
thrpt: [1.1316 GiB/s 1.1322 GiB/s 1.1326 GiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildtransfer/walltime/pacing-false/varying-seeds time: [3.2065 ms 3.2075 ms 3.2088 ms]
thrpt: [1.2174 GiB/s 1.2178 GiB/s 1.2182 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severetransfer/walltime/pacing-true/same-seed time: [4.0477 ms 4.0492 ms 4.0511 ms]
thrpt: [987.39 MiB/s 987.85 MiB/s 988.23 MiB/s]transfer/walltime/pacing-true/varying-seeds time: [3.9127 ms 3.9149 ms 3.9176 ms]
thrpt: [1021.0 MiB/s 1021.7 MiB/s 1022.3 MiB/s]Instructions per cycleCriterion reported no significant timing changes. All benchmarks
Profiles for profiler.firefox.com (64)
Download data for |

Time a send on a stream that already has data in flight, as on a long-lived stream, rather than its first send.