Repository navigation
quest(release-perf): accept the sparse rows, plan the fanout lock fix - #7299
Conversation
Quest-Claim: 1f0778c2e697bcdf
The relay fanout pairing is bimodal on main: in four of seven rounds the relay spreads its subscriber tasks over every Tokio worker and contends the track's shared lock, doubling or tripling its CPU. The sparse read rows are flat after #6921, leaving the accepted per-group cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on as a child 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 7 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 90b93fd9cb1e27acd106f1c6f900c39a539366ea.
No actionable bugs found in this documentation/design change. Separating the accepted sparse per-group cost from the required fanout contention fix is a sound direction. Comparing release's read path first, then reducing redundant locking and adding a multi-reader reproducer, keeps the proposed work focused rather than committing prematurely to a broader concurrency redesign.
Verification: statically reviewed both changed quest documents and the referenced publisher/resume/track polling paths and sparse benchmark. I did not run tests, benchmarks, or profiles, and cannot independently verify the reported measurements or causal attribution. No prior published review findings to carry forward.
Re-runs the release pairing the 2026-10-25 decision asked for (relay fanout plus the sparse rows), now that moq-dev/moq#6921 has landed, and records the result in
quest/m1/release-perf/README.md. The epic has no Required children; this is its own remaining work.Measurements
release(de0a2b0534) againstmain(7c8e255304). The host was shared with other agents' builds: 1-minute load 11 to 29 on 24 cores. A quiet host was not available.Relay fanout is bimodal on main. Seven alternating rounds:
Delivery was the same on both (640 frames/s, p99 within 2%).
compare.pyreports "sign varies across pairs": paired deltas from −15% to +218%, median +119%, MAD 99%. The high runs share one mechanism:kio::Lock, taken by every subscriber'sreadinpoll_recv_next → poll_group → poll_peek_groupandpoll_forward_drop → poll_drop, plus the wakes that follow.Video used 9.7% less relay CPU (MAD 7.1%), with 1.4% more frames delivered.
track_sparse_read/timedis flat now. Medians of three alternating rounds:From 16 to 4096 gaps, main grows 20% and release 9% (it was 4.3x at 4096 before moq-dev/moq#6921). Both benches do the same work per iteration: create, write, finish, and receive two groups. The remaining gap is the per-group model cost the README already accepts.
Decisions
quest/m1/release-perf/fanout-lock.md, ranked in the epic'sRequired. It carries what the profile found (the bimodal relay CPU, the busy-worker and context-switch counts, and the futex waits on the track's sharedkio::Lockunderpoll_recv_nextandpoll_forward_drop), an approach, and the re-pair that verifies it.The epic's own work is now the fanout re-pair against
releaseonce the child lands. Since it has a child, the README's title drops its size.Choices made without asking
track_sparse_read, not the fulljust bench origin/release. A full run is about 1,000 cases on each side plus two full bench builds, over two hours on this host. The Plan's remaining questions were only fanout and sparse.bench/run.sh. The relay driver reusesbench/relay.shandbench/compare.pyunchanged, with the same alternating order. It was needed becauserun.shhas no relay-only mode. The sparse driver was needed because release'strackbench has noasyncfeature, sorun.sh --criterioncannot build both sides with one set of cargo arguments.Follow-ups
bench/run.sh: a relay-only pairing mode, and per-side cargo features in--criterionpairing so it works againstrelease.bench/compare.py: flag a bimodal side (one side's spread far above the other's) instead of only "sign varies".just bench-profile: allow the default shared runtime, where the fanout mode shows up.Checks
quest check --base origin/main: passed on90b93fd9cb.just ci origin/main: passed on2ba27b6848.90b93fd9cbonly edits quests.Review
gpt-6.1-sol, medium effort, viaquest review --base origin/main.90b93fd9cb1e27acd106f1c6f900c39a539366ea(round 1, session01a18e75-4d1d-73f0-be39-294e83cee04c): no findings.2ba27b68480653c9c273a316f5c9c49a662763b1: round 1, no findings.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)