Skip to content

bench(matching): zsync 10GB sparse VM bench scaffold (#2082) - #4283

Merged
oferchen merged 1 commit into
masterfrom
bench/zsync-large-dataset-plan-2082
May 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
bench/zsync-large-dataset-plan-2082

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds scripts/zsync_bench_large_dataset.sh: release-qualification benchmark that generates a 10 GiB sparse VM-style image (35% sector fill, deterministic LCG offsets) and a target with ~1% scattered byte modifications, then measures oc-rsync (and optionally upstream rsync) delta-update wall clock, transferred bytes, and peak RSS.
  • Adds tools/ci/run_zsync_large_bench.sh: CI wrapper with prerequisite skip-or-fail semantics (ZSYNC_LARGE_BENCH_REQUIRED=1 to enforce). Default behaviour is to exit 0 with a skip message, so it is safe to invoke from any pipeline.
  • Adds docs/benchmarks/zsync-large-dataset.md: scenario specification, expected runtime (4 - 9 minutes on a typical Linux runner), resource envelope (~22 GiB scratch, <500 MiB RSS target), and result-interpretation guide tying back to the existing bithash_rejection.rs, prune_duplicate_heavy.rs, and BufferPool budgeting notes.

The benchmark is gated behind OC_RSYNC_LARGE_BENCH=1 and is intended for release qualification only; default CI never runs it. Companion to the in-process Criterion microbenchmark crates/matching/benches/zsync_medium_dataset.rs (100 MiB / 5%, #2081).

Why

Issue #2082 asks for a 10 GiB scenario representative of the zsync use case (large mostly-unchanged binary file) so the match-index path can be exercised at a scale that stresses L3 cache, disk I/O scheduling, and delta-emission backpressure simultaneously. Too heavy for per-PR CI, but valuable for catching regressions before tagging a release.

Safety

  • Scratch directory: ${TMPDIR:-/tmp}/oc-rsync-zsync-large.$$ (PID-suffixed).
  • Cleanup rm -rf only fires on the exact PID-suffixed path; no variable-expanded deletes into bind-mounted paths.
  • macOS runners that lack dd oflag=seek_bytes are skipped gracefully by the CI wrapper.

Test plan

  • CI fmt + clippy stays green (no Rust changes).
  • Manual: OC_RSYNC_LARGE_BENCH=1 BENCH_SIZE_GB=1 ./scripts/zsync_bench_large_dataset.sh runs end-to-end on a Linux host with oc-rsync + upstream rsync available.
  • Manual: ./tools/ci/run_zsync_large_bench.sh (no env var) prints the skip message and exits 0.
  • Manual: ZSYNC_LARGE_BENCH_REQUIRED=1 ./tools/ci/run_zsync_large_bench.sh (no env var) exits 2.

Adds a release-qualification benchmark that exercises the match-index
and rolling-hash pipeline on a 10 GiB sparse VM-style image with ~1%
modified bytes. Gated behind OC_RSYNC_LARGE_BENCH=1 so default CI is
unaffected; a tools/ci wrapper provides skip-or-fail semantics for the
release pipeline.

Includes the scenario specification, expected runtime envelope, and
result-interpretation guide alongside the existing benchmark docs.
@oferchen
oferchen merged commit a4f25b6 into master May 17, 2026
16 of 17 checks passed
oferchen added a commit that referenced this pull request May 18, 2026
Adds a release-qualification benchmark that exercises the match-index
and rolling-hash pipeline on a 10 GiB sparse VM-style image with ~1%
modified bytes. Gated behind OC_RSYNC_LARGE_BENCH=1 so default CI is
unaffected; a tools/ci wrapper provides skip-or-fail semantics for the
release pipeline.

Includes the scenario specification, expected runtime envelope, and
result-interpretation guide alongside the existing benchmark docs.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a release-qualification benchmark that exercises the match-index
and rolling-hash pipeline on a 10 GiB sparse VM-style image with ~1%
modified bytes. Gated behind OC_RSYNC_LARGE_BENCH=1 so default CI is
unaffected; a tools/ci wrapper provides skip-or-fail semantics for the
release pipeline.

Includes the scenario specification, expected runtime envelope, and
result-interpretation guide alongside the existing benchmark docs.
@oferchen
oferchen deleted the bench/zsync-large-dataset-plan-2082 branch May 19, 2026 19:28
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds a release-qualification benchmark that exercises the match-index
and rolling-hash pipeline on a 10 GiB sparse VM-style image with ~1%
modified bytes. Gated behind OC_RSYNC_LARGE_BENCH=1 so default CI is
unaffected; a tools/ci wrapper provides skip-or-fail semantics for the
release pipeline.

Includes the scenario specification, expected runtime envelope, and
result-interpretation guide alongside the existing benchmark docs.
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