Skip to content

WebTransport: cover the per-session datagram queue's watermark, priority, and byte-budget eviction - #3987

Closed
jesup wants to merge 1 commit into
users/jesup/expire_datagramsfrom
users/jesup/watermark_priority_eviction
Closed

jesup wants to merge 1 commit into
users/jesup/expire_datagramsfrom
users/jesup/watermark_priority_eviction

Conversation

@jesup

@jesup jesup commented Sep 14, 2026

Copy link
Copy Markdown
Member

No description provided.

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.

🟡 Changes recommended

The tests reuse a datagram ID, omit HTTP/3 resume-event forwarding coverage, and retain a misleading test name.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds integration coverage for per-session WebTransport datagram queue behavior.

Changes:

  • Tests watermark backpressure and resume signaling.
  • Tests send-order priority and byte-budget eviction.
  • Updates outdated connect-udp coverage and imports.
File summaries
File Description
neqo-transport/src/connection/tests/datagram.rs Tests per-session resume signaling.
neqo-http3/tests/webtransport.rs Updates SendGroupId import and formatting.
neqo-http3/tests/connect_udp.rs Replaces obsolete connection-wide backpressure assertions.
neqo-http3/src/features/extended_connect/tests/webtransport/mod.rs Adjusts test helper return type and imports.
neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs Adds watermark, priority, and eviction tests.
Review details

Suppressed comments (1)

neqo-http3/src/features/extended_connect/tests/webtransport/datagrams.rs:206

  • next_id is not advanced for the datagram accepted on the first overflow, so the first “high-priority” datagram reuses both the tracking ID and payload of a still-queued low-priority datagram. Consequently, was_received(high_priority_ids[0]) can be satisfied by the low-priority copy and does not prove that high-priority datagram traversed the live connection. Keep the IDs unique before leaving this loop.
            low_priority_ids.push(next_id);
            break;
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread neqo-http3/tests/connect_udp.rs Outdated
@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.89%. Comparing base (5df7db1) to head (bab27a4).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           users/jesup/expire_datagrams    #3987      +/-   ##
================================================================
+ Coverage                         96.85%   96.89%   +0.03%     
================================================================
  Files                               119      119              
  Lines                             41385    41385              
  Branches                          41385    41385              
================================================================
+ Hits                              40083    40099      +16     
+ Misses                             1278     1260      -18     
- Partials                             24       26       +2     
Flag Coverage Δ
freebsd 94.40% <ø> (+0.07%) ⬆️
linux 97.08% <ø> (+0.01%) ⬆️
macos 95.22% <ø> (+0.04%) ⬆️
windows 95.31% <ø> (+0.04%) ⬆️

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

Components Coverage Δ
neqo-common 99.26% <ø> (ø)
neqo-http3 95.34% <ø> (+0.15%) ⬆️
neqo-qpack 96.91% <ø> (ø)
neqo-transport 97.87% <ø> (-0.01%) ⬇️
neqo-udp 95.37% <ø> (ø)
mtu 89.13% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 3.57%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 79 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation coalesce_acked_from_zero 1 ranges 2.6 µs 2.7 µs -4.05%
❌ Simulation coalesce_acked_from_zero 3 ranges 3.4 µs 3.5 µs -3.09%

Tip

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


Comparing users/jesup/watermark_priority_eviction (bab27a4) with users/jesup/expire_datagrams (0b3378b)1

Open in CodSpeed

Footnotes

  1. No successful run was found on users/jesup/expire_datagrams (5df7db1) during the generation of this report, so 707f6df was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@jesup
jesup force-pushed the users/jesup/expire_datagrams branch from d74cf65 to b3a3b72 Compare September 14, 2026 05:31
@jesup
jesup force-pushed the users/jesup/watermark_priority_eviction branch from af88cc2 to 288713f Compare September 14, 2026 05:31
@jesup
jesup force-pushed the users/jesup/expire_datagrams branch from b3a3b72 to af3de7e Compare September 14, 2026 17:56
@jesup
jesup force-pushed the users/jesup/watermark_priority_eviction branch from 288713f to 2053125 Compare September 14, 2026 17:56
@jesup
jesup force-pushed the users/jesup/expire_datagrams branch from af3de7e to 579205f Compare September 16, 2026 03:45
@jesup
jesup force-pushed the users/jesup/watermark_priority_eviction branch from 2053125 to 3c0dfc6 Compare September 16, 2026 03:45
@jesup
jesup force-pushed the users/jesup/expire_datagrams branch from 579205f to 3f55403 Compare September 16, 2026 17:19
@jesup
jesup force-pushed the users/jesup/watermark_priority_eviction branch from 3c0dfc6 to 5c377c8 Compare September 16, 2026 17:19
@jesup
jesup force-pushed the users/jesup/expire_datagrams branch from 3f55403 to 0b3378b Compare September 17, 2026 05:01
@jesup
jesup force-pushed the users/jesup/watermark_priority_eviction branch from 5c377c8 to 026d19e Compare September 17, 2026 05:01
…ity, and byte-budget eviction

Adds send-order priority delivery and byte-budget eviction coverage through
a live WebTransport connection, and the equivalent low-level resume-signal
test directly on Connection
(resume_signal_fires_once_a_blocked_queue_drains_below_watermark).

Keeps a WebTransport test that the resume signal is forwarded all the way to
Http3ServerEvent::OutgoingDatagramSpaceAvailable: the transport-level test
only proves a ConnectionEvent is queued, and connect-udp cannot drive this
at all, having no outgoingHighWaterMark equivalent. Its own copy of the old
test is renamed to what it now checks.
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

No significant performance differences relative to 5df7db1.

All results
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1504: No change in performance detected.
       time:   [132.44 ms 132.62 ms 132.82 ms]
       thrpt:  [752.90 MiB/s 754.04 MiB/s 755.08 MiB/s]
change:
       time:   [-0.2036% +0.0124% +0.2216%] (p = 0.91 > 0.05)
       thrpt:  [-0.2211% -0.0124% +0.2040%]
       No change in performance detected.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1504: Change within noise threshold.
       time:   [216.10 ms 216.34 ms 216.57 ms]
       thrpt:  [46.174 Kelem/s 46.224 Kelem/s 46.276 Kelem/s]
change:
       time:   [+0.6312% +0.8183% +1.0128%] (p = 0.00 < 0.05)
       thrpt:  [-1.0027% -0.8117% -0.6272%]
       Change within noise threshold.
Found 4 outliers among 100 measurements (4.00%)
3 (3.00%) low mild
1 (1.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1504: Change within noise threshold.
       time:   [7.4105 ms 7.4146 ms 7.4188 ms]
       thrpt:  [134.79   B/s 134.87   B/s 134.94   B/s]
change:
       time:   [+0.1499% +0.2265% +0.3063%] (p = 0.00 < 0.05)
       thrpt:  [-0.3054% -0.2260% -0.1497%]
       Change within noise threshold.
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1504: No change in performance detected.
       time:   [135.93 ms 136.37 ms 137.13 ms]
       thrpt:  [729.21 MiB/s 733.29 MiB/s 735.66 MiB/s]
change:
       time:   [-0.4522% -0.0592% +0.5934%] (p = 0.86 > 0.05)
       thrpt:  [-0.5899% +0.0592% +0.4542%]
       No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
7 (7.00%) high mild
1 (1.00%) high severe
streams/walltime/1-streams/each-1000-bytes: Change within noise threshold.
       time:   [552.84 µs 554.67 µs 556.79 µs]
       thrpt:  [1.7128 MiB/s 1.7194 MiB/s 1.7251 MiB/s]
change:
       time:   [+0.2900% +0.8153% +1.3237%] (p = 0.00 < 0.05)
       thrpt:  [-1.3064% -0.8087% -0.2891%]
       Change within noise threshold.
Found 11 outliers among 100 measurements (11.00%)
11 (11.00%) high severe
streams/walltime/1000-streams/each-1-bytes: No change in performance detected.
       time:   [10.538 ms 10.552 ms 10.566 ms]
       thrpt:  [92.421 KiB/s 92.545 KiB/s 92.667 KiB/s]
change:
       time:   [-0.0083% +0.1833% +0.3715%] (p = 0.06 > 0.05)
       thrpt:  [-0.3701% -0.1830% +0.0083%]
       No change in performance detected.
streams/walltime/1000-streams/each-1000-bytes: Change within noise threshold.
       time:   [33.992 ms 34.026 ms 34.061 ms]
       thrpt:  [27.999 MiB/s 28.028 MiB/s 28.056 MiB/s]
change:
       time:   [+0.5737% +0.7203% +0.8698%] (p = 0.00 < 0.05)
       thrpt:  [-0.8623% -0.7151% -0.5704%]
       Change within noise threshold.
streams-flow-controlled/walltime/1-streams/each-4194304-bytes: No change in performance detected.
       time:   [25.828 ms 25.861 ms 25.895 ms]
       thrpt:  [154.47 MiB/s 154.67 MiB/s 154.87 MiB/s]
change:
       time:   [-0.2133% +0.1742% +0.4661%] (p = 0.36 > 0.05)
       thrpt:  [-0.4639% -0.1739% +0.2138%]
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
streams-flow-controlled/walltime/10-streams/each-1048576-bytes: Change within noise threshold.
       time:   [71.758 ms 71.841 ms 71.926 ms]
       thrpt:  [139.03 MiB/s 139.20 MiB/s 139.36 MiB/s]
change:
       time:   [+0.7659% +0.9292% +1.0899%] (p = 0.00 < 0.05)
       thrpt:  [-1.0782% -0.9206% -0.7601%]
       Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/walltime/pacing-false/varying-seeds: No change in performance detected.
       time:   [17.537 ms 17.556 ms 17.585 ms]
       thrpt:  [227.47 MiB/s 227.84 MiB/s 228.09 MiB/s]
change:
       time:   [-0.1261% +0.0070% +0.1793%] (p = 0.94 > 0.05)
       thrpt:  [-0.1790% -0.0070% +0.1263%]
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
transfer/walltime/pacing-true/varying-seeds: Change within noise threshold.
       time:   [17.822 ms 17.834 ms 17.846 ms]
       thrpt:  [224.14 MiB/s 224.29 MiB/s 224.44 MiB/s]
change:
       time:   [+0.0277% +0.1252% +0.2231%] (p = 0.01 < 0.05)
       thrpt:  [-0.2226% -0.1251% -0.0277%]
       Change within noise threshold.
Found 4 outliers among 100 measurements (4.00%)
4 (4.00%) high mild
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [17.461 ms 17.485 ms 17.522 ms]
       thrpt:  [228.29 MiB/s 228.76 MiB/s 229.08 MiB/s]
change:
       time:   [-0.9201% -0.7422% -0.5038%] (p = 0.00 < 0.05)
       thrpt:  [+0.5064% +0.7477% +0.9286%]
       Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
transfer/walltime/pacing-true/same-seed: Change within noise threshold.
       time:   [17.885 ms 17.896 ms 17.907 ms]
       thrpt:  [223.38 MiB/s 223.52 MiB/s 223.65 MiB/s]
change:
       time:   [+0.3643% +0.4610% +0.5593%] (p = 0.00 < 0.05)
       thrpt:  [-0.5562% -0.4589% -0.3630%]
       Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) low mild
4 (4.00%) high mild

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 2.23 2.22 -0.8%
transfer/1-conn/1-100mb-req (aka. Upload)/mtu-1504 2.22 2.20 -0.8%
transfer/walltime/pacing-true/varying-seeds 2.21 2.20 -0.6%
transfer/1-conn/1-100mb-resp (aka. Download)/mtu-1504 2.27 2.26 -0.5%
transfer/walltime/pacing-false/same-seed 2.21 2.22 +0.4%
streams/walltime/1000-streams/each-1000-bytes 1.94 1.93 -0.4%
streams-flow-controlled/walltime/1-streams/each-4194304-bytes 2.17 2.18 +0.4%
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS)/mtu-1504 1.76 1.76 -0.3%
transfer/1-conn/1-1b-resp (aka. HPS)/mtu-1504 1.81 1.81 -0.2%
streams/walltime/1-streams/each-1000-bytes 1.82 1.82 -0.2%
transfer/walltime/pacing-true/same-seed 2.21 2.21 -0.1%
streams/walltime/1000-streams/each-1-bytes 2.11 2.11 +0.1%
transfer/walltime/pacing-false/varying-seeds 2.21 2.21 -0.1%

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

@github-actions

Copy link
Copy Markdown
Contributor

Performance profiles for profiler.firefox.com

Benchmarks (14)
  • neqo-bin-main: pr · base
  • neqo-common-decoder: pr · base
  • neqo-http3-streams_simulated: pr · base
  • neqo-http3-streams_walltime: pr · base
  • neqo-transport-frame_decode: pr · base
  • neqo-transport-min_bandwidth: pr · base
  • neqo-transport-pacer: pr · base
  • neqo-transport-packet_codec: pr · base
  • neqo-transport-range_tracker: pr · base
  • neqo-transport-rx_stream_orderer: pr · base
  • neqo-transport-send_streams: pr · base
  • neqo-transport-sent_packets: pr · base
  • neqo-transport-transfer_simulated: pr · base
  • neqo-transport-transfer_walltime: pr · base
Comparisons (5)

@github-actions

Copy link
Copy Markdown
Contributor

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to users/jesup/expire_datagrams at 5df7db1.

neqo-pr as clientneqo-pr as server
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: BP BA
neqo-pr vs. lsquic: L1 C1
neqo-pr vs. msquic: Z A L1 ⚠️L2 C1
neqo-pr vs. mvfst: A
neqo-pr vs. neqo: Z A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: Z ⚠️L1 C1 CM
neqo-pr vs. picoquic: Z A
neqo-pr vs. quic-go: A
neqo-pr vs. quiche: BP BA
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: S R Z A L1 C1
aioquic vs. neqo-pr: 🚀C1 CM
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: BP BA CM
lsquic vs. neqo-pr: ⚠️C1
msquic vs. neqo-pr: CM
mvfst vs. neqo-pr: Z L1 C1 CM
neqo vs. neqo-pr: Z A
openssl vs. neqo-pr: LR M A CM
quic-go vs. neqo-pr: CM
quiche vs. neqo-pr: CM
quinn vs. neqo-pr: V2 CM
s2n-quic vs. neqo-pr: ⚠️B BA CM
tquic vs. neqo-pr: CM
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

@github-actions

Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 5df7db1.

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
neqo-neqo-cubic-nopacing 61.3 ± 3.1 51.2 – 71.1 60.3 ± 2.6 521.8 ± 26.7 💚 -2.5 (-3.9%)

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 456.8 ± 2.8 453.2 – 467.6 456.3 ± 2.0 70.0 ± 0.4
google-neqo-cubic 266.2 ± 3.1 261.4 – 275.7 265.1 ± 1.6 120.2 ± 1.4 -0.3 (-0.1%)
neqo-google-cubic 646.5 ± 2.4 641.5 – 653.2 646.6 ± 2.2 49.5 ± 0.2 -0.8 (-0.1%)
neqo-neqo-cubic 62.5 ± 3.4 52.2 – 78.6 62.3 ± 1.8 511.8 ± 28.0 +0.2 (+0.4%)
neqo-neqo-cubic-nopacing 61.3 ± 3.1 51.2 – 71.1 60.3 ± 2.6 521.8 ± 26.7 💚 -2.5 (-3.9%)
neqo-neqo-newreno 62.5 ± 2.4 57.8 – 73.1 62.4 ± 1.6 512.2 ± 19.9 +0.5 (+0.8%)
neqo-neqo-newreno-nopacing 63.0 ± 2.9 51.7 – 69.4 62.7 ± 2.2 508.3 ± 23.4 -0.3 (-0.5%)
neqo-quiche-cubic 109.8 ± 3.4 100.4 – 118.1 110.5 ± 1.3 291.4 ± 9.0 -0.3 (-0.3%)
neqo-s2n-cubic 132.4 ± 3.2 122.7 – 140.2 132.1 ± 3.1 241.7 ± 5.8 -0.1 (-0.1%)
quiche-neqo-cubic 133.6 ± 1.6 130.7 – 140.1 133.4 ± 1.2 239.5 ± 2.9 +1.1 (+0.8%)
quiche-quiche 134.1 ± 3.5 128.7 – 145.5 133.8 ± 3.9 238.6 ± 6.2
s2n-neqo-cubic 213.6 ± 2.4 208.8 – 219.6 213.1 ± 2.3 149.8 ± 1.7 +0.1 (+0.1%)
s2n-s2n ⚠️ 285.0 ± 21.1 254.9 – 383.5 282.2 ± 2.8 112.3 ± 8.3

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

@mxinden

mxinden commented Sep 22, 2026

Copy link
Copy Markdown
Member

As far as I can tell, this mostly adds tests. Can these tests be folded into the pull requests that add their corresponding features?

@jesup

jesup commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

Merged into PR #3983 and #3985

@jesup jesup closed this Sep 22, 2026
@jesup
jesup deleted the users/jesup/watermark_priority_eviction branch September 30, 2026 03:19
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.

3 participants