Skip to content

test(relay): make the concurrent-groups sim test fast - #9608

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/quic-sim-bulk-slow
Nov 25, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/quic-sim-bulk-slow

Conversation

@kixelated

@kixelated kixelated commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m1/quic-sim-bulk-slow.md (deleted here).

Summary

quic_sim::concurrent_groups_carry_bulk_transfers_losslessly now 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 unoptimized moq-quic/kio/moq-net code, 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):

wall (real) CPU user+sys simulated frames written
before, 12 groups 19.7, 19.8, 19.7 s (28.8 s at load 20+) 20.1 to 28 s 66.4 ms 6467
after, 4 groups 6.7, 7.1 s 7.7 s 66.4 ms 2170

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 (allowance in rs/moq-net/src/transport/boxed.rs, the pre-#9210 behavior, then reverted) fails the test at 4 groups with data0 frame 1: evicted. On the other side, 100 groups stay in the nightly many_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 check passes (526 tests).

Models

  • Size: S
  • Implementer: Claude Code, claude-sonnet-5-5, unknown (arm B)

Overlap

moq-dev/moq#9439 touches the sibling nightly many_groups_carry_bulk_transfers_losslessly and its constants in the same file; this PR changes only SESSIONS and its doc comment, so a textual conflict is unlikely.

Decisions (made without asking, afk)

  • Fewer groups, not a build-profile change. Setting opt-level = 1 for moq-quic, kio, and moq-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.
  • 4, not 3 or 6: 3 is the least that fails the mutation but leaves no margin; 6 costs 2x more.

Follow-ups

None added.

(Written by Sonnet 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 88f6eac
  • Base: origin/main at 1d6aa3a
  • Risk: low, 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.
  • Classified: low by Claude Code, claude-haiku-5-5, low effort, session 358c8435-a98c-4bea-9aa0-3317db856aca
  • Local review: none, since the head is low risk

kixelated and others added 2 commits November 25, 2026 04:42
…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>
@kixelated kixelated changed the title Make the relay's concurrent-groups sim test fast test(relay): make the concurrent-groups sim test fast Nov 25, 2026
@kixelated
kixelated marked this pull request as ready for review November 25, 2026 14:54
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The 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: Minimal · up to 88f6e

This only shortens a slow simulation test and removes a planning note. It has no effect on runtime behavior, and the author reports the reduced test still catches the targeted regression.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the concurrent-groups sim test is made faster. It is a test-only change that reduces SESSIONS from 12 to 4 to cut runtime. The conventional-commit prefix and scope are…
Description check Passed The description explains the change in detail. It covers the SESSIONS reduction from 12 to 4, the profiling results, the validation timings, the mutation check, the overlap with another PR, and the de…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the concurrent-groups sim test is made faster. It is a test-only change that reduces SESSIONS from 12 to 4 to cut runtime. The conventional-commit prefix and scope are accurate.

Full details: Description check

Explanation

The description explains the change in detail. It covers the SESSIONS reduction from 12 to 4, the profiling results, the validation timings, the mutation check, the overlap with another PR, and the deleted quest plan file. It relates directly to the changeset.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7d4cd1f1-2d90-4803-a519-4d09c7e6dd21
Commits

Reviewing files that changed from the base of the PR and between 9ad7001 and 88f6eac.

Files selected for processing: 2

  • quest/m1/quic-sim-bulk-slow.md
  • rs/moq-relay/tests/integration/quic_sim.rs
Files with no reviewable changes: 1

  • quest/m1/quic-sim-bulk-slow.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@kixelated
kixelated added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 7c144d7 Nov 25, 2026
12 checks passed
@kixelated
kixelated deleted the quest/m1/quic-sim-bulk-slow branch November 25, 2026 16:33
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.

1 participant