Repository navigation
bench: reuse sent_packets buffers so the heap is not trimmed - #4414
larseggert wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the changes that reduce allocator noise by reusing benchmark buffers.
No open issues 🎉
What changed in this PR
This PR reduces allocator-related noise in Neqo’s sent-packet benchmarks by reusing buffers between iterations, avoiding heap trimming and subsequent page faults in timed work.
Changes:
- Adds a shared buffer pool and a wrapper that returns packet storage to the pool when dropped.
- Updates
take_ranges,track, andremove_expiredbenchmarks to reuse storage, switchingtrackto borrowed batched inputs.
| File | Description |
|---|---|
neqo-transport/benches/sent_packets.rs |
Pools and reuses packet buffers across benchmark iterations. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4414 +/- ##
==========================================
- Coverage 96.61% 96.61% -0.01%
==========================================
Files 118 118
Lines 43894 43894
Branches 43894 43894
==========================================
- Hits 42410 42406 -4
- Misses 1463 1467 +4
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
|
Client/server transfer resultsPerformance differences relative to c46d346. Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.
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 |
Merging this PR will degrade performance by 0.69%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
Benchmark resultsNo significant performance differences relative to c46d346. All resultstransfer/1-conn/1-100mb-req (aka. Upload)/mtu-1500 time: [61.450 ms 61.492 ms 61.535 ms]
thrpt: [1.5870 GiB/s 1.5881 GiB/s 1.5892 GiB/s]transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1500 time: [61.572 ms 61.636 ms 61.711 ms]
thrpt: [1.5825 GiB/s 1.5844 GiB/s 1.5860 GiB/s]
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severetransfer/1-conn/1-1b-resp (aka. HPS)/mtu-1500 time: [3.8071 ms 3.8081 ms 3.8091 ms]
thrpt: [262.53 B/s 262.60 B/s 262.67 B/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mildtransfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1500 time: [88.051 ms 88.212 ms 88.374 ms]
thrpt: [113.16 Kelem/s 113.36 Kelem/s 113.57 Kelem/s]streams-flow-controlled/walltime/1-streams/each-4194304-bytes time: [13.330 ms 13.334 ms 13.338 ms]
thrpt: [299.90 MiB/s 299.99 MiB/s 300.08 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high mildstreams-flow-controlled/walltime/10-streams/each-1048576-bytes time: [36.065 ms 36.113 ms 36.158 ms]
thrpt: [276.56 MiB/s 276.91 MiB/s 277.28 MiB/s]
Found 14 outliers among 100 measurements (14.00%)
1 (1.00%) low severe
13 (13.00%) low mildstreams/walltime/1-streams/each-1000-bytes time: [162.01 µs 162.69 µs 163.56 µs]
thrpt: [5.8307 MiB/s 5.8619 MiB/s 5.8866 MiB/s]
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mildstreams/walltime/1000-streams/each-1-bytes time: [4.7801 ms 4.7820 ms 4.7838 ms]
thrpt: [204.14 KiB/s 204.22 KiB/s 204.30 KiB/s]
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) low mildstreams/walltime/1000-streams/each-1000-bytes time: [15.316 ms 15.325 ms 15.334 ms]
thrpt: [62.194 MiB/s 62.230 MiB/s 62.267 MiB/s]
Found 7 outliers among 100 measurements (7.00%)
5 (5.00%) low mild
2 (2.00%) high mildtransfer/walltime/pacing-false/same-seed time: [3.4361 ms 3.4383 ms 3.4404 ms]
thrpt: [1.1354 GiB/s 1.1361 GiB/s 1.1368 GiB/s]transfer/walltime/pacing-false/varying-seeds time: [3.5050 ms 3.5070 ms 3.5094 ms]
thrpt: [1.1131 GiB/s 1.1138 GiB/s 1.1145 GiB/s]transfer/walltime/pacing-true/same-seed time: [3.8136 ms 3.8163 ms 3.8196 ms]
thrpt: [1.0227 GiB/s 1.0236 GiB/s 1.0243 GiB/s]transfer/walltime/pacing-true/varying-seeds time: [3.9921 ms 3.9945 ms 3.9975 ms]
thrpt: [1000.6 MiB/s 1001.4 MiB/s 1002.0 MiB/s]Instructions per cycleCriterion reported no significant timing changes. All benchmarks
Profiles for profiler.firefox.com (64)
Download data for |
Freeing a
sent::Packetsbuffer per iteration lets glibc trim the heap, which the next timed iteration then faults back in.