Repository navigation
quest: finish the m0 compile-time audit - #6106
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Records llvm-lines for moq-tokio, moq-net, moq-mux, moq-relay and the moq CLI, release -Z time-passes attribution for the moq binary, and a net-edit `just check` baseline. The largest attributable cost, moq-net monomorphized per transport, is already planned in quest/m1/net-erase-transport.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thin LTO grows libmoq_ffi.a 13.8% (71.2 to 81.1 MiB of the Go mirror's 100 MiB limit), costs about 2% more instructions on moq-net benches, and cuts the final release unit's wall time by about 40% on two jobs. The profile stays fat pending the maintainer's decision. 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>
|
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 5 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. |
Finishes the m0 run of the compile-time audit. It deletes
quest/m0/audit-compile-time.mdand adds the recurring successor,quest/m1/audit-compile-time.md, at the end of m1'sRequired. The successor's Plan holds the baselines, the results, and what to check first. No source changes.Measured
All measurements are on
d55407256(main at 4576bb1 merged in), in the pinned shell with two jobs, on a shared host.cargo llvm-lines, dev, deterministic. moq-tokio lib: 1.66M lines. 43.2% of that is moq-net code that is generic over the transport session, so it compiles once per transport and again under the IETFControlStreamAdapter. Smaller targets: moq-cli bin 1.04M, moq-mux lib 0.91M, moq-relay lib 0.71M (28% serde from TOML config, 8.6% usage-rs derive), moq-net lib 0.69M, moq-relay bin 0.38M.-Z time-passeson themoqbinary.LLVM_fatltotakes 74%,LLVM_passes23%, codegen_crate 1.7%, the frontend 0.9%, and link 0.3%. The final unit is all serial LLVM work on one fat-LTO module.just check. The probe is one comment line in moq-net. It selected 29 Rust packages, and the test build took 5m40s (524 mbx hits, 83 misses). The run then stopped on the known failover flake after 663 of 7,890 tests.Load-sensitive numbers. Every time above depends on host load: the release build ran at load 21 to 89, time-passes at 25 to 52, and
just checkat 20 to 44, on 24 to 32 CPUs. The successor records the load next to each run. Compare pass and phase shares, not seconds. The llvm-lines counts are the only deterministic numbers.Thin-LTO experiment
Thin was switched on with
CARGO_PROFILE_RELEASE_LTO=thin; the profile is unchanged. Build:d55407256, x86_64 Linux host, two jobs.(a) Size, deterministic, the deciding number.
libmoq_ffi.a(Go mirror,--features openh264)libmoq_ffi.somoqCLIBoth fit under the 100 MiB per-file limit. Thin cuts the headroom from 28.8 MiB to 18.9 MiB. Only x86_64 Linux was built. For the other targets, the mirror's v0.4.17 fat archives are 61.5 MiB (linux_arm64), 54.4 MiB (windows_amd64) and 40.5 MiB (darwin_arm64).
(b) Build time. Load averages were 20 to 51, so these are load-sensitive: compare ratios, not seconds.
-p moq-ffi, both modes at once-p moq-cli --bin moq, both modes at oncemoq_ffifinal unit, interleaved, two rounds with order swappedmoqfinal unit, interleaved, two rounds with order swappedWith two jobs, thin LTO's parallel backend gets only two threads, so more cores would save more wall time.
(c) Runtime.
perf statis blocked here (perf_event_paranoidis 4, and I did not change it). Instead, these are instruction counts from valgrind cachegrind on criterion--test, which runs each case once:session_delivery_viewers(lite-06, lite-07, moq-transport-22): 2,621M fat, 2,677M thin (+2.1%).track_fanout: 414M fat, 421M thin (+1.6%).Not measured. Thin sizes for linux_arm64, darwin_arm64 and windows_amd64; build time above two jobs; wall-clock runtime. The host never went quiet, so no further timing runs were done.
Decisions
Recorded as the paper trail. The release profile was confirmed by the maintainer; the others took the recommended option.
lto = "thin"workspace-wide. Cargo refusesltoin per-package overrides, so it can't apply to the CLI alone. The final release unit's wall time drops by about 40%, and every artifact still fits.just checkbaselineChecks
quest check: passed.just check origin/mainon the final diff (quest files only): passed at84028acc3. At43a2de5e8, everything passed exceptbench/relay.test.py, which failed twice on the foreign-listener port-collision flake. moq-dev/moq#6121 fixes that flake.just checkwith the moq-net probe: failed on the known flake. That run was a measurement only, and the probe is reverted.Follow-ups
These go through
/quest-plan.Any::decode_atomis instantiated for four reader types, 38k lines and 4.2% of moq-mux. The successor lists this as a candidate.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code