Repository navigation
fix(moq-congestion): BBR3 skips ProbeRTT when congestion left no queue - #9381
Conversation
Quest-Claim: 1f6da4772f00828a
An application-limited flow whose RTT samples since its latest loss or CE stayed within 1.125x of BBR.min_rtt skips a due ProbeRTT, as QUICHE's probe_rtt_skipped_if_similar_rtt_ does. A one-off overflow, such as a warm-up burst, no longer cuts a live track below its own rate and leaves it ~240 ms behind live for seconds. Adds benchmark_join_lag to nightly and deletes quest/m1/peer-link-steady-lag.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
✅ No new issues found.
Approach: Sound. Swapping the boolean congestion veto for a per-signal minimum RTT fixes the cause: a one-off overflow with no lasting queue no longer forces ProbeRTT. A flow sitting beside a real queue still enters ProbeRTT.
Reviewed changes: I reviewed the BBR3 ProbeRTT skip rule, its tests, the new nightly join-lag benchmark and how it is wired in, and the README divergence note.
SIMILAR_MIN_RTTskip inupdate_min_rtt: a congestion signal now starts a lowest-sample tracker at infinity, and each freshrssample lowers it. An application-limited flow skips a due ProbeRTT once that tracker sits within 1.125 ×min_rtt. This is stricter than QUICHE's whole-window minimum, because a renewed loss erases the earlier evidence.- Spurious-loss undo: this restores the pre-episode tracker, keeping the lower of the saved and current values. A
Noneundo correctly clears the episode's lone signal.set_min_rtt_stampstill resets both fields. - CE ordering: the CE-marked ACK's own sample is processed before
on_ce, so it never counts as post-signal evidence. The 20 ms CE case incongested_interval_enters_probe_rttpins this. - Tests:
congested_interval_enters_probe_rttsweeps samples on both sides of the 1.125 threshold, for loss and for CE.spurious_loss_keeps_the_probe_rtt_skipnow uses queued samples, so only the undo decides the outcome. benchmark_join_lag: a new ignored nightly benchmark covering 2 rates × 2 stream windows × 3 runs. It has a 300 s nextest budget and is added to the nightly filter as a plain name, which the JUnit match check verifies.setup_throughnow delegates to the newsetup_served, which takes the server's QUIC config.- Docs and cleanup: the
rs/moq-quic/README.mddivergence note describes the new skip condition, and the PR deletes the finished quest file.
claude-opus-5-5 | 𝕏

Problem
moq-dev/moq#9329 saw a 16 Mbps track on a warm cross-region peer link settle about 385 ms behind live in some runs, instead of about 145 ms. I rebuilt that measurement and it reproduces on its own. The cause is BBR3's ProbeRTT, not a window or host load: the writer's timer overshoot stayed at 1 to 2 ms. #9329's windows have nothing to do with it; it shows at 1, 4, and 64 MiB stream windows.
Sender-side BBR3 trace of a bad run (200 Mbps bottleneck, 125 ms each way, 250 ms drop-tail queue):
So the "steady" 385 ms was a one-off 4 s episode, about 10 s after any congestion. #9329's last-3 s window happened to catch it. Yet the flow's RTT samples stayed within 0.2% of min_rtt the whole time: there was no queue for ProbeRTT to drain.
Approach
An application-limited flow now skips a due ProbeRTT despite congestion when every RTT sample since the latest loss or CE sat within 1.125 × BBR.min_rtt. This is QUICHE's
probe_rtt_skipped_if_similar_rtt_(kSimilarMinRttThreshold).probe_rtt_skip_congested: boolbecomesprobe_rtt_congested: Option<Duration>: set by a congestion signal, it holds the lowest RTT sample since the latest signal. Spurious-loss undo restores it, keeping the lower of the saved and current values.congested_interval_enters_probe_rttnow covers samples at 1.0, 1.12, 1.13, and 2 × min_rtt for loss and CE.spurious_loss_keeps_the_probe_rtt_skipnow uses queued samples, so it still tests the undo.benchmark_join_lag(rs/moq-tokio/tests/integration/receive_credit.rs, wired insh/gh/nightly.sh). It rebuilds fix: peer links default to 64 MiB windows, every stream to 4 MiB #9329's measurement as a peer link: 64 MiB connection windows, 125 ms each way, a 250 ms drop-tail queue, and a 32 MiB warm-up, then a 2 s mid-group join watched for 12 s. It runs at 1 Gbps and 200 Mbps, with the default 4 MiB stream window and with 64 MiB. It reports caught-up time, median and worst lag after catch-up, and queue drops..config/nextest.tomlgives the benchmark a 300 s budget, as it doesbenchmark_receive_windows.rs/moq-quic/README.mddivergence note describes the new skip rule.quest/m1/peer-link-steady-lag.md.Impact
Alternatives
Decisions
Choices I took without the maintainer (a review can undo each):
bulk_flow_at_min_rtt_enters_probe_rtt) exists for convergence between BBR flows.Validation
just checkpasses.cargo test -p moq-congestion --lib: 131 passed.benchmark_join_lag, release, ondesktop(loaded: load 14 on 24 cores; writer timer overshoot ≤ 9 ms). Median of 3 runs per row; 1000 and 200 are Mbps:"Before" is this branch with the threshold set to 0, which restores main's rule. The caught-up time at 1 Gbps with 4 MiB varies run to run (catch-up is stream-credit-bound, as fix: peer links default to 64 MiB windows, every stream to 4 MiB #9329 measured).
Independent check with an instrumented (uncommitted) BBR3 state trace on the scratch version of the measurement. This used the same path with an 8 s watch, 6 runs per cell, at 1, 4, and 64 MiB windows:
Not run on a quiet host:
nixosandfedorawere as loaded asdesktop. The trace attributes the lag to ProbeRTT directly, and timer overshoot rules out the host.Caused by
Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 38bfd02
Base: origin/main at 142769f
Risk: medium,
The BBR3 congestion change in `rs/moq-congestion` alters when application-limited flows skip ProbeRTT and what min_rtt they adopt, so relays and clients running that controller could see different throughput and lag, but the API, wire format, and auth are unchanged and a revert undoes all of it. The other files are tests, a benchmark, a README, a deleted quest plan, and a nightly benchmark selection, none of which consumers rely on.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
97b6b03b-e3f7-4b46-8e9c-4b853204f17eReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a202b7-14ed-7511-82a7-cfb3b1240fe5, round 2Score: 10/10,
The timeout override fixes the earlier finding, and the incremental change introduces no new findings.Rounds: 2; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0
Findings: none
The last round's findings, at 827cb39:
rs/moq-tokio/tests/integration/receive_credit.rs:1502:Split the benchmark sweep to fit the nightly runner budget;The head adds an exact-match override for receive_credit::benchmark_join_lag in .config/nextest.toml, increasing its inherited benchmark timeout to 300 seconds and accommodating the reported 224-second run.