Repository navigation
perf(mux): fix export regressions found by the main against release comparison - #6784
Conversation
Quest-Claim: b8518661d44554fd
`just bench <base>` discovers each target's cases from a short Criterion run, and failed outright on a harness = false target that prints its own table, such as moq-cli's play_buffer. Such a target is now listed as skipped, so a base whose bench later became Criterion reports its cases as new. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its 256-track case panicked with TooManyRenditions, since one catalog holds at most hang::catalog::MAX_RENDITIONS (64). The sweep now tops out there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #6109, Handle::add resolves once the peer grants the token, so a watch created afterwards already holds that grant and changed() waited forever. relay_auth_refresh hung before its first case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #6428 every tier shares the one depth-0 group's snapshot, so 50,000 paths over four tiers (about 86 MB) outgrow the 32 MB frame cap and the track ends with FRAME_TOO_LARGE, as doc/concept/stats.md describes. The case measured an ended track and failed its own check; one tier still sweeps to 50,000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… update Both exports rebuilt the jitter buffer's expected-track set on every poll, cloning and sorting every track name per frame in MKV. Tracks change only when the catalog does, so the set is now set there. container-export instructions: mkv/16x64 27.1M to 17.6M (-35%), flv/16x64 14.5M to 12.9M. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The T-STD schedule looks up per-PID buffers for every queued unit on each PCR slot, and SipHash was 18% of the export. PIDs are at most 13 bits from a bounded catalog, so a fast hasher is safe. container-export/ts/16x64 instructions 30.8M to 25.5M (-17%), ts/1x64 -12%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read slope The 2026-10-25 run left one accidental regression, the sparse read slope from dynamic range requests, and an inconclusive relay fanout pairing. The epic keeps them as remaining work with a child quest, instead of finishing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Decisions settled 2026-10-25, applying the maintainer's standing go-ahead to take the recommendations:
Recorded in 01e3bab249. Marking ready. (Written by Claude Opus 5.5) |
|
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 6 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: 01e3bab
No actionable bugs found in the changed code. Moving FLV/MKV jitter expectations to catalog updates preserves the bound-track set while removing per-frame rebuilding; the TS hash changes stay confined to bounded integer PID keys. The benchmark repairs and explicit release follow-ups are a reasonable, limited direction without additional abstraction.
This is the first published review; no earlier findings to reconcile. The sparse-read regression and inconclusive fanout result are explicitly tracked outstanding work, not resolved by these optimizations or newly discovered findings.
Verification: static review of the diff and relevant exporter, jitter-buffer, scheduling and benchmark context only. I did not run tests or benchmarks or independently reproduce the reported performance results.
|
Requeuing after the merge queue dropped this on (Written by Claude Opus 5.5) |
…/README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
(Written by Claude Opus 5.5) |
Works quest/m1/release-perf/README.md: the final main against release comparison before the cut.
Run
release(3db33f6715) againstmain(018f1c46e5): 1,019 paired Criterion cases withjust bench origin/release, three relay load pairings, and nine Chromium frame rounds with an A/A pair. Every slower case was re-run in alternating rounds and counted in callgrind instructions (host load 20 to 60).The 40 slowest paired cases (wall-time medians, before triage)
track_sparse_read/timed/4096track_gap_flush/4096track_gap_flush/512track_sparse_read/timed/256track_gap_flush/64track_stamp_groups/sparse/512track_stamp_groups/sparse/4096track_stamp_groups/sparse/64track_sparse_read/timed/16frame_recv/upfront/size=262144/streams=64annexb-import-bytes/1tracks-1frames/256frame_recv/budget/size=262144/streams=64annexb-import-frames/1tracks-1frames/256annexb-import-frames/1tracks-1frames/4096annexb-import-bytes/1tracks-1frames/4096origin/retire/100fsession_delivery_group_cost/moq-transport-22/relays=1/publishers=16/broadcasts=1/viewers=64/watch=1/frame=64/fetchorigin/retire/1000fframe_recv/budget/size=16384/streams=64cmaf-import-frames/4tracks-1frames/256session_delivery_paced/moq-transport-22/relays=1/publishers=16/broadcasts=1/viewers=256/watch=1/frame=64/pacedmoqsink/eos/renditions=1/64cmaf-import-bytes/4tracks-1frames/256contended_notify/threads_1/4096track_datagram_subscriber_join/64d/1session_delivery_group_cost/moq-transport-22/relays=1/publishers=16/broadcasts=1/viewers=16/watch=1/frame=64/fetchsession_delivery_group_cost/moq-transport-22/relays=1/publishers=1/broadcasts=1/viewers=16/watch=1/frame=64/fetchgroup_write_frames/single/2048origin/resume_overlap/sequence/1r_64g_32csession_delivery_group_cost/moq-transport-22/relays=1/publishers=1/broadcasts=1/viewers=64/watch=1/frame=64/fetchorigin/retire/10000fsession_delivery_fetch_frames/moq-transport-22/relays=1/publishers=4/broadcasts=1/viewers=16/watch=1/frame=64/fetchsession_delivery_fetch_frames/moq-transport-22/relays=1/publishers=1/broadcasts=1/viewers=16/watch=1/frame=64/fetchorigin/reprice_duplicate/240d_240s_cost2session_idle/moq-transport-16/sessions=1024/consumers=1session_delivery_scale/moq-lite-07-wip/relays=1/publishers=64/broadcasts=1/viewers=64/watch=1/frame=64origin/resume_overlap/sequence/1r_64g_1csession_idle/moq-transport-22/sessions=1024/consumers=1frame_recv/upfront/size=2097152/streams=64session_dash_relays/moq-transport-22/relays=2/projects=32/tracks=24/total=768Instruction counts for the unexamined screen rows:
origin/reprice_duplicate/240d_240s_cost2225M release against 125M main (noise);session_dash_relays/moq-transport-22at 768 tracks 720M against 1.09G over 2 relays, 731M against 1.09G over 3, and 17.6G against 11.1G over 33 (flat per-track cost, falling with relays).Fixes
container-export/mkv/16x6427.1M to 17.6M instructions (2.27x to 1.47x release, now flat across the sweep),flv/16x6414.5M to 12.9M.container-export/ts/16x6430.8M to 25.5M (2.70x to 2.24x).bench/run.shskips non-Criterion targets; the moq-mux catalog bench caps renditions athang::catalog::MAX_RENDITIONS; the relay auth bench checks the grant it already holds instead of awaiting a change that never comes since moq-dev/moq#6109 (it hung before its first case); moq-statsproducer_tickskips tiers above one at 50,000 paths.Accepted (flat per operation, recorded in the quest)
protect1.5x on grouped frames (1.21x datagrams): per-group model cost; the crypto is unchanged.moqsink/eos+12% per event: moq-dev/moq#5512 and the gstreamer-rs 0.25 bump in moq-dev/moq#6169.group_write_frames1.67x,track_stamp_groups/sparse1.48x (was 4.4x), session families 1.2x to 1.76x,session_dash_relays1.50x at few relays: the per-frame, per-group, and per-track costs the quest already accepts. The import fixed costs and IETF/fetchrows reappear unchanged.1x1to 2.24x at16x64: the T-STD schedule scans and sorts every queued unit per PCR slot. Left to the performance audit (see decisions).Noise:
frame_recv/upfront/256K/64is 3 to 4x wall at 0.96x instructions; its 8x page faults are glibc trimming the freed buffers, and with malloc tunables pinned both sides fault 4.6k times and time the same (the relay runs jemalloc).session_idleIETF at 1024 sessions,resume_overlap,retire,contended_notify, andproducer/mergeare at parity in alternating rounds or instructions.Relay: video -7.8% relay CPU, same delivery. Fanout +16.4%, but paired deltas were -1.5%, +16.4%, +26.1% at load 25 and the previous run measured -12%: inconclusive. Browser frames: lite 1.09 to 1.14x and IETF 0.95x, the same as at the 2026-10-23 decision.
Remaining
Dynamic range requests (merged 2026-10-24) re-judges every deferred gap on each hand-out through
Cursor::probeandMisses::judge.track_sparse_read/timed/4096is 1079x release (2.75 ms against 2.5 us), with instructions per pair growing from 152k at 16 gaps to 51.4M at 4096, andtrack_gap_flushsetup is quadratic. No open PR fixes it. The quest stays open with a child, sparse-misses.md, plus the fanout re-run.Decisions
Decided 2026-10-25 by the maintainer, taking the recommendations:
quest/m1/release-perf/sparse-misses.md, which blocks the cut.Impact
Public API: none. Wire: none.
moq-muxadds arustc-hashdependency (already a workspace dependency).Checks
quest checkpasses. moq-mux nextest passed (1,742 tests). Scoped Rust lint and test of the changed crates and their dependents passes (4,441 tests). Fulljust checkfails only incheck flake, which cannot build the GitHub runner VM image in this sandbox (unshare: write failed /proc/self/uid_map); unrelated to this diff.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code