Skip to content

perf: add full vs incremental flist memory benchmark (#1864)#3540

Merged
oferchen merged 1 commit into
masterfrom
bench/flist-memory-1864
May 1, 2026
Merged

perf: add full vs incremental flist memory benchmark (#1864)#3540
oferchen merged 1 commit into
masterfrom
bench/flist-memory-1864

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 1, 2026

Summary

Modes

Mode Description
A Full flist (--no-inc-recursive)
B Default (receiver INC_RECURSE; sender always sends full list)
C Sender INC_RECURSE (skipped - awaiting #1862 opt-in flag)

Container invocation

podman exec rsync-profile bash /workspace/scripts/benchmark_flist_memory.sh \
    --scales both --summary

Fixtures live under /tmp/oc-rsync-bench inside the container (not bind-mounted). Cleanup uses a path guard that refuses any rm -rf outside that prefix to avoid the bind-mount accident class. TSV/MD output is written to target/benchmarks/.

Helper flags: --scales 100k|1m|both, --summary (markdown table), RUNS=N env (default 3).

Baseline numbers (oc-rsync v0.5.9 vs upstream 3.4.1, aarch64-linux)

100K files

Mode Binary Wall (s) Peak RSS (MB)
A oc-rsync 2.81 42.7
B oc-rsync 2.91 42.6
A upstream 3.68 14.2
B upstream 4.39 7.9

1M files

Mode Binary Wall (s) Peak RSS (MB)
A oc-rsync 53.6 218.2
B oc-rsync 53.6 218.5
A upstream 49.0 76.8
B upstream 58.7 7.5

Key findings

Reproduction cost

Scale Generation Per push (median) Total wall
100K 3 s ~3 s ~50 s
1M 41 s ~50-58 s ~12 min

Test plan

  • bash -n syntax check on the script
  • 100K run completed end-to-end inside rsync-profile container; TSV+MD written
  • 1M run completed end-to-end inside rsync-profile container; TSV+MD written
  • Path guard rejects paths outside /tmp/* or /var/tmp/* prefix
  • Script handles missing oc-rsync binary, picks oc-rsync-dev when present
  • Re-run after Make Debian alternatives opt-in and clarify amd64 tarball distribution #1862 lands to populate Mode C numbers

Notes

  • The benchmark is not wired into CI; it is a developer/release tool intended to track flist memory progress over time. No new dependencies are added.
  • Working-tree mode-bit churn (644 vs 755) on the script file may show up locally; the index has it 755 so the committed/pushed version is executable.

Adds scripts/benchmark_flist_memory.sh which compares peak RSS of
oc-rsync against upstream rsync 3.4.1 at 100K and 1M directory scales
under three flist modes:

- Mode A: full flist (--no-inc-recursive)
- Mode B: default (receiver INC_RECURSE)
- Mode C: sender INC_RECURSE (skipped, pending #1862 opt-in flag)

Measures wall-clock time and peak RSS via /usr/bin/time -v, runs each
mode 3 times and takes the median, writes TSV to target/benchmarks/
and emits an optional markdown summary. Fixtures live under
/tmp/oc-rsync-bench (not bind-mounted) with a path guard that refuses
to rm anywhere outside that prefix.

Documents 2026-05-01 baseline numbers in
docs/benchmarks/flist-memory-baseline-2026-05-01.md - upstream peak
RSS drops from 76.8 MB (Mode A) to 7.5 MB (Mode B) at 1M files, while
oc-rsync stays at ~218 MB across both modes (sender-side INC_RECURSE
not yet active). Refs #966/#971 for the RSS gap context.
@oferchen oferchen merged commit 0feafcc into master May 1, 2026
12 checks passed
@oferchen oferchen deleted the bench/flist-memory-1864 branch May 2, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant