Repository navigation
test(relay): make the concurrent-groups sim test fast - #9608
Conversation
Quest-Claim: 0a85224464c10d2e
…welve Each group's bulk transfer costs the same CPU to simulate (~2 s of unoptimized QUIC per group on a loaded host), so the test took 20-60 s against nextest's 30 s SLOW mark. Four groups still pause more than the two a full stream window per pause allows (that mutation evicts a stream), and 100 stay in the nightly many_ test. 6.7-7.1 s now, with the same 66 ms of simulated time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe bulk-transfer simulation test now uses four sessions instead of 12. Its comment describes how four sessions exceed the two-stream eviction case and notes that each session has equal simulation cost. The planning document for reducing the test’s runtime was deleted. Merge Risk:
|
Finishes quest/m1/quic-sim-bulk-slow.md (deleted here).
Summary
quic_sim::concurrent_groups_carry_bulk_transfers_losslesslynow pauses 4 bulk transfers on one connection instead of 12 (SESSIONS). Nothing else in the test changed.Profiling (
perf record, flat profile) shows the time is per-packet work in the unoptimizedmoq-quic/kio/moq-netcode, and it scales linearly with groups: every group's writer runs until the readers finish, so each group moves about 34 MiB (539 of 640 frames, bounded by the pacing windows) through the simulated QUIC, however little (1 MiB) the reader takes. Simulated time is only 66 ms, so the test is all CPU.Impact
Test-only. No public API, wire, or behavior change.
Validation
Measured with
quest gate, on a heavily loaded host (load average 11 to 26 over the runs; user CPU is the steadier number):That is about 2.9x faster, inside nextest's 30 s SLOW mark (
.config/nextest.toml; the quest quotes 60 s, which is the terminate point) with margin on a loaded host. Per-group cost is constant (2, 3, 4, 6, 12 groups: 4.4, 6.7, 9.1, 14.2, 28.8 s real in one loaded run).What 4 groups still proves, checked by mutation: setting a paused stream's allowance back to the full stream window (
allowanceinrs/moq-net/src/transport/boxed.rs, the pre-#9210 behavior, then reverted) fails the test at 4 groups withdata0 frame 1: evicted. On the other side, 100 groups stay in the nightlymany_groups_carry_bulk_transfers_losslessly. What the gate gives up: a regression whose share per paused stream fits 4 streams but not 12 now shows up only in the nightly (the earlier ~32 KiB fixed share, which failed at 60, was not caught at 12 either).quest gate just checkpasses (526 tests).Models
Overlap
moq-dev/moq#9439 touches the sibling nightly
many_groups_carry_bulk_transfers_losslesslyand its constants in the same file; this PR changes onlySESSIONSand its doc comment, so a textual conflict is unlikely.Decisions (made without asking, afk)
opt-level = 1formoq-quic,kio, andmoq-net([profile.dev.package.*]) keeps 12 groups at about 5.7 s CPU (5x), but any two of the three give only ~12 s, and recompiling after an edit to those three costs about 150 to 165 CPU s against 9 to 50 s (wall 35 to 41 s against 7 to 26 s). That taxes every dev build of the most-edited crate for one test. Recommend against; it is the better lever only if the whole QUIC sim suite ever needs it.Follow-ups
None added.
(Written by Sonnet 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.What could break is a test: lowering SESSIONS from 12 to 4 in the relay's concurrent-groups sim test could weaken what it checks, but only the test suite is affected, no consumer, peer, or shipped code. Deleting the quest plan file touches only planning docs. Both are fully undone by a revert.358c8435-a98c-4bea-9aa0-3317db856aca