Skip to content

bench: full vs incremental flist memory on 100K/1M file push (#1864) - #4163

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

oferchen merged 1 commit into
masterfrom
bench/flist-memory-1864

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds scripts/benchmark_flist_memory_daemon.sh, a daemon-push
    companion to the existing local-push scripts/benchmark_flist_memory.sh.
    Spawns a temporary oc-rsync --daemon, pushes fixtures into it from
    the same host, and tears the daemon down on EXIT.
  • Generates 100K and 1M empty-file source trees (100 dirs x 1000 files
    and 1000 dirs x 1000 files). Empty files keep the focus on file-list
    memory rather than transfer bytes.
  • Runs each fixture in two modes: Mode A --no-inc-recursive (full
    flist, pre-protocol-30 behaviour) and Mode B default
    (receiver INC_RECURSE). For each (scale, mode) the script records
    peak client RSS via /usr/bin/time -v and computes
    bytes_per_file = peak_rss / file_count.
  • Checks df -i for the BENCH_ROOT filesystem before generating each
    fixture and skips the dataset if the inode budget would exceed 80 %
    of available inodes. The check parses the free-inode column by
    header name (ifree / iavail) so it works on both Linux GNU
    coreutils and macOS BSD layouts.
  • Writes a TSV under target/benchmarks/flist_memory_daemon_*.tsv and,
    with --summary, a markdown table to stdout (and a sibling .md
    file) showing Mode | Scale | Files | Wall (s) | Peak RSS (MB) |
    Bytes/file.

Notes

  • Operator script, not a CI gate. The 1M scale can take ~30 min and is
    sensitive to allocator and kernel; the per-PR memory signal already
    lives in crates/protocol/benches/file_entry_memory.rs.
  • BENCH_ROOT is restricted to /tmp or /var/tmp and the cleanup
    helper refuses paths outside it, mirroring the existing local-push
    script and the project's documented bind-mount safety rules.
  • Daemon is started with OC_RSYNC_DAEMON_FALLBACK=0 so the native
    oc-rsync receiver path is under measurement (not the system rsync
    delegation path).

Test plan

  • bash -n scripts/benchmark_flist_memory_daemon.sh clean
  • bash scripts/benchmark_flist_memory_daemon.sh --scales 100k --runs 1 --summary inside the rsync-profile container produces a TSV + markdown table with non-zero peak RSS for both modes
  • Inode budget message fires (or skips) when run against a filesystem with insufficient inodes
  • Daemon process is gone after the script exits (pgrep -af oc-rsync.*daemon returns nothing)

…#1864)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
@oferchen
oferchen merged commit 736e329 into master May 16, 2026
8 checks passed
@oferchen
oferchen deleted the bench/flist-memory-1864 branch May 16, 2026 19:49
oferchen added a commit that referenced this pull request May 18, 2026
…#1864) (#4163)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
oferchen added a commit that referenced this pull request May 18, 2026
…#1864) (#4163)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
oferchen added a commit that referenced this pull request Aug 24, 2026
…#1864) (#4163)

Add scripts/benchmark_flist_memory_daemon.sh, a daemon-mode companion
to the existing local-push flist memory bench. Spawns a temporary
oc-rsync daemon, pushes 100K- and 1M-file fixtures through it under
both --no-inc-recursive (full flist) and the default receiver
INC_RECURSE mode, and reports peak client RSS plus bytes-per-file
overhead in a markdown table. df -i is consulted up front so
fixtures are skipped when the inode budget would not fit; the daemon
is torn down by an EXIT trap. Operator script, not a CI gate.
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