Repository navigation
chore(bench): add daemon cold-start hyperfine harness (DIS-1) - #4813
Merged
Merged
Conversation
Adds scripts/benchmark_daemon_cold_start.sh, a repeatable harness that reproduces the daemon cold-start gap (oc-rsync ~1.35s vs upstream ~0.36s, ~3.7x) so DIS-2 profiling and DIS-4.a-e audits can measure progress against a stable reference. Two daemons (oc-rsync, upstream) run side-by-side on different ports with identical module config and corpus. hyperfine drives both with --warmup 0 and per-command --prepare so every sample is a true cold invocation. The upstream rsync binary is held constant on the CLIENT side to isolate the daemon-side cost. The summary block prints oc / upstream mean wall time and the ratio. Runs cleanly inside the rsync-profile podman container and on bare Linux CI. shellcheck -x clean. No Rust source touched.
3 of 4 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Adds scripts/benchmark_daemon_cold_start.sh, a repeatable harness that reproduces the daemon cold-start gap (oc-rsync ~1.35s vs upstream ~0.36s, ~3.7x) so DIS-2 profiling and DIS-4.a-e audits can measure progress against a stable reference. Two daemons (oc-rsync, upstream) run side-by-side on different ports with identical module config and corpus. hyperfine drives both with --warmup 0 and per-command --prepare so every sample is a true cold invocation. The upstream rsync binary is held constant on the CLIENT side to isolate the daemon-side cost. The summary block prints oc / upstream mean wall time and the ratio. Runs cleanly inside the rsync-profile podman container and on bare Linux CI. shellcheck -x clean. No Rust source touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/benchmark_daemon_cold_start.sh, a repeatable hyperfine harness that reproduces the daemon cold-start gap.Design
hyperfine --warmup 0so the very first invocation (TCP handshake,@RSYNCD:greeting, auth probe, module open, flist exchange, generator/receiver wiring) is part of every measured sample - the cold-start cost is not amortised away.--preparewipes the client-side destination before every sample so quick-check skip never elides the transfer.oc / upstreammean wall time and the ratio, with the DIS-1 reference gap (3.70x) inline for quick comparison.EXIT/INT/TERMviatrap.OC_RSYNC_DAEMON_FALLBACK=0is set so oc-rsync's native daemon path is exercised (not the delegation-to-system-rsync fallback)./usr/local/bin/oc-rsync-dev(rsync-profile container), thentarget/release/oc-rsync, thentarget/dist/oc-rsync, then PATH. Upstream rsync is taken fromtarget/interop/upstream-install/{3.4.2,3.4.1}/bin/rsyncor/usr/bin/rsync.BENCH_ROOTis constrained to/tmpor/var/tmpto prevent anyrm -rffrom touching a bind-mounted workspace.Scope
scripts/benchmark_daemon_cold_start.sh.Test plan
bash -nsyntax check passes.shellcheck -xclean.--helprenders usage with options and environment table.rsync-profilepodman container:podman exec rsync-profile bash /workspace/scripts/benchmark_daemon_cold_start.sh -n 10and confirm the printed ratio is in the ~3-4x range against the documented baseline.target/interop/upstream-install/3.4.2/bin/rsyncpresent and confirm both daemons start and the summary block prints.