Repository navigation
bench(engine): scaffold PIP-6 end-to-end parallel-vs-sequential bench harness - #4679
Merged
Merged
Conversation
Adds the end-to-end production-path bench harness for the parallel- receive-delta promotion chain. PIP-6 is the third bench in the sequence after BR-3i.f (#2502, apply-loop) and BR-3j.f (#2508, post-DashMap re-bench). Scope: drives a real oc-rsync client against a real oc-rsync daemon over rsync:// loopback, on workload shapes calibrated to the Path B dispatch boundary (file_count > 100 || total_size > 64 MiB) that PIP-3+5 (PR #4666) wired into ReceiverContext::dispatch_receiver_strategy. Comparison shape: same workload, two oc-rsync binaries (default-features build vs --no-default-features --features 'zstd lz4 xattr iconv'). The no-parallel build trips the parallel_unavailable fallback path in crates/transfer/src/receiver/mod.rs and always picks sequential. Workload matrix: - single_large_file (1x1 GiB, parallel by byte threshold) - many_small_files (10_000x4 KiB, parallel by count) - boundary_under (50 files, 32 MiB, sequential control) - boundary_over (200 files, 32 MiB, parallel above count) - mixed_directory (1_000 files, ~600 MiB, parallel) Decision criteria: - Win on >= 2 of 5 shapes (parallel_wall / sequential_wall <= 0.9) - No shape regresses by more than 5% - boundary_under within +/-3% (harness control) Bench compiles; numbers capture is the follow-up. The section-4 table in docs/design/parallel-receive-delta-default-on.md is the target for the wall-clock data.
oferchen
force-pushed
the
bench/pip-6-end-to-end
branch
from
May 21, 2026 15:50
c1005db to
11e4fa9
Compare
5 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…#4679) Adds the end-to-end production-path bench harness for the parallel- receive-delta promotion chain. PIP-6 is the third bench in the sequence after BR-3i.f (#2502, apply-loop) and BR-3j.f (#2508, post-DashMap re-bench). Scope: drives a real oc-rsync client against a real oc-rsync daemon over rsync:// loopback, on workload shapes calibrated to the Path B dispatch boundary (file_count > 100 || total_size > 64 MiB) that PIP-3+5 (PR #4666) wired into ReceiverContext::dispatch_receiver_strategy. Comparison shape: same workload, two oc-rsync binaries (default-features build vs --no-default-features --features 'zstd lz4 xattr iconv'). The no-parallel build trips the parallel_unavailable fallback path in crates/transfer/src/receiver/mod.rs and always picks sequential. Workload matrix: - single_large_file (1x1 GiB, parallel by byte threshold) - many_small_files (10_000x4 KiB, parallel by count) - boundary_under (50 files, 32 MiB, sequential control) - boundary_over (200 files, 32 MiB, parallel above count) - mixed_directory (1_000 files, ~600 MiB, parallel) Decision criteria: - Win on >= 2 of 5 shapes (parallel_wall / sequential_wall <= 0.9) - No shape regresses by more than 5% - boundary_under within +/-3% (harness control) Bench compiles; numbers capture is the follow-up. The section-4 table in docs/design/parallel-receive-delta-default-on.md is the target for the wall-clock data.
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
Adds the design doc plus criterion harness scaffold for PIP-6 - the end-to-end production-path bench for parallel-receive-delta. This is the third bench in the parallel-receive-delta chain: BR-3i.f (#2502, completed) covers the apply-loop scheduling layer with in-memory sinks, BR-3j.f (#2508, pending) is the post-DashMap re-bench, and PIP-6 measures the receiver dispatch + apply through the full production pipeline against a real
oc-rsyncdaemon overrsync://loopback.The Path B heuristic landed via PIP-3+5 (PR #4666 merged):
file_count > 100 || total_size > 64 MiBdispatches the receiver to the parallel apply path. The promotion table indocs/design/parallel-receive-delta-default-on.mdsection 4 still hasTBDcells; PIP-6 produces the numbers that fill them.Workload matrix
Five shapes calibrated to the dispatch boundary. Each annotated with the production heuristic's decision.
single_large_filemany_small_filesboundary_underboundary_overmixed_directoryboundary_underis the control - both builds dispatch sequential there, so wall-clock should agree within +/-3%.Comparison shape
Same workload, two
oc-rsyncbinaries:target/release/oc-rsync- default features; parallel-receive-delta available.target/release-no-parallel/oc-rsync- built with--no-default-features --features 'zstd lz4 xattr iconv'; dispatcher logsparallel_unavailablepercrates/transfer/src/receiver/mod.rs:480-494and always picks sequential.Paths resolved via
OC_RSYNC_BIN_PARALLEL/OC_RSYNC_BIN_SEQUENTIAL. Missing binary triggers aeprintln!skip rather than a panic.Decision criteria
parallel_wall / sequential_wall <= 0.9on at least 2 of 5 shapes.boundary_underwall-clock agrees within +/-3% between the two builds.Bench placement
The scaffold lives in
crates/core/benches/pip_6_end_to_end_parallel_vs_sequential.rs(not the engine crate) because the harness drivesoc-rsyncas a subprocess andcore/benches/already hosts the daemon-driventransfer_benchmark.rspattern this scaffold mirrors. Theenginecrate's deps cannot reach the daemon or the full transfer pipeline.Follow-up
Bench execution + numbers capture is intentionally not in this PR (hardware-sensitive, container-bound). The design doc section 9 lists the four follow-up items before publishable numbers can land:
cargo buildscript / xtask.rsync-profile(NVMe + xxh3) andoc-rsync-bench(HDD-ish + aarch64 software MD5) containers.docs(design):commit that fills section 4 ofdocs/design/parallel-receive-delta-default-on.md.Files
docs/design/pip-6-end-to-end-parallel-vs-sequential-bench-2026-05-21.md- design doc (295 lines).crates/core/benches/pip_6_end_to_end_parallel_vs_sequential.rs- criterion bench scaffold (490 lines).crates/core/Cargo.toml- bench target registration.Test plan
fmt+clippy,nextest (stable), Windows, macOS, Linux musl.cargo build -p core --benchescompiles the scaffold without warnings.References
docs/design/parallel-receive-delta-default-on.md.docs/design/abw-2-pipelined-verify-write-deferred-2026-05-21.md.project_parallel_delta_apply_phase2.md.