Skip to content

Refactor daemon CLI into dedicated module - #1681

Merged
oferchen merged 1 commit into
masterfrom
prepare-for-production-release-and-cleanup
Oct 30, 2025
Merged

oferchen merged 1 commit into
masterfrom
prepare-for-production-release-and-cleanup

Conversation

@oferchen

@oferchen oferchen commented Oct 30, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • extract the daemon CLI entry points into a new cli module
  • re-export the CLI helpers from lib.rs and keep shared fallback utilities there

Testing

  • cargo test -p rsync-daemon --lib --quiet

@oferchen
oferchen merged commit 628b959 into master Oct 30, 2025
@oferchen
oferchen deleted the prepare-for-production-release-and-cleanup branch October 30, 2025 12:41
oferchen added a commit that referenced this pull request May 5, 2026
Captures the load-bearing facts a runtime profile of #1679 will then
quantify: every Mutex::lock() site reachable from drain_parallel is
enumerated, the per-thread Vec mitigation from #1680 is shown to be
contention-free in steady state, and three alternative designs (single
Mutex, per-thread Vec, lock-free MPSC) are compared with file:line
citations. Recommends deferring #1681 until #1679 measures the sharded
design at W=32 / 64.
oferchen added a commit that referenced this pull request May 17, 2026
Adds a Criterion bench in crates/transfer/benches that compares three
rayon dispatch shapes - `into_par_iter` over an owned Vec, `par_bridge`
over a Vec iterator, and `par_bridge` over a pure generator - across
{1, 4, 8, 16} workers on a fixed 100K small-file workload. Throughput
is reported in items/sec via `Throughput::Elements`. The numbers feed
the dispatch-shape decisions tracked in #1284, #1370, and #1681.
oferchen added a commit that referenced this pull request May 17, 2026
…ems (#4203)

Add a criterion bench that compares per-item send+recv cost across
`std::sync::mpsc::channel`, `crossbeam_channel::unbounded`, and
`crossbeam_channel::bounded(1024)` at 100K items. Sweeps payload sizes
{32 B, 256 B, 4 KB} and thread shapes {1S+1R, 4S+1R, 1S+4R, 4S+4R} to
expose the contention regimes that appear in the engine and receiver
pipelines. Payloads are pre-allocated outside the timed section so the
measurement isolates channel cost from allocation. Throughput is
reported via `Throughput::Elements(100_000)` so the criterion summary
gives items/sec directly.

Pure userspace synchronisation - no I/O, no platform-specific paths,
runs identically on Linux, macOS, and Windows.

Refs #1592 #1681 #1370
oferchen added a commit that referenced this pull request May 17, 2026
Design note for the lock-free MPSC variant of
WorkQueueReceiver::drain_parallel. Sketches the crossbeam_channel
swap, documents the ordering contract delegated to ReorderBuffer,
defines the 20% threshold on the #4214 drain_parallel_alternatives
bench that gates the migration, and lays out a feature-flag rollout
plan. Recommendation is to defer the implementation until the
#4214 numbers land on the reference host. Cross-refs #4170, #4173,
#4203, #4214.
oferchen added a commit that referenced this pull request May 17, 2026
Adds drain_parallel_alternatives benchmark comparing three fan-in
strategies on the WorkQueueReceiver drain path: the current sharded
Mutex<Vec> indexed by rayon thread index, a per-thread Vec with final
concat (no mutex), and a crossbeam_channel MPSC drain. Runs at 10K and
100K items across 4, 8, and 16 rayon workers, reporting throughput in
elements per second so reviewers can compare per-iteration cost
directly.

Pre-allocates DeltaWork items outside the timed section, isolates each
worker count in a private rayon pool, and shares the same simulated
per-item compute across strategies so the only delta between groups is
the collector itself. Closes the measurement gap that #1681 needs to
decide whether the current sharded Mutex<Vec> warrants replacement
(#1682, refs #4170 / #4173 / #4203).
oferchen added a commit that referenced this pull request May 17, 2026
Adds drain_parallel_alternatives benchmark comparing three fan-in
strategies on the WorkQueueReceiver drain path: the current sharded
Mutex<Vec> indexed by rayon thread index, a per-thread Vec with final
concat (no mutex), and a crossbeam_channel MPSC drain. Runs at 10K and
100K items across 4, 8, and 16 rayon workers, reporting throughput in
elements per second so reviewers can compare per-iteration cost
directly.

Pre-allocates DeltaWork items outside the timed section, isolates each
worker count in a private rayon pool, and shares the same simulated
per-item compute across strategies so the only delta between groups is
the collector itself. Closes the measurement gap that #1681 needs to
decide whether the current sharded Mutex<Vec> warrants replacement
(#1682, refs #4170 / #4173 / #4203).
oferchen added a commit that referenced this pull request May 17, 2026
Adds drain_parallel_alternatives benchmark comparing three fan-in
strategies on the WorkQueueReceiver drain path: the current sharded
Mutex<Vec> indexed by rayon thread index, a per-thread Vec with final
concat (no mutex), and a crossbeam_channel MPSC drain. Runs at 10K and
100K items across 4, 8, and 16 rayon workers, reporting throughput in
elements per second so reviewers can compare per-iteration cost
directly.

Pre-allocates DeltaWork items outside the timed section, isolates each
worker count in a private rayon pool, and shares the same simulated
per-item compute across strategies so the only delta between groups is
the collector itself. Closes the measurement gap that #1681 needs to
decide whether the current sharded Mutex<Vec> warrants replacement
(#1682, refs #4170 / #4173 / #4203).
oferchen added a commit that referenced this pull request May 18, 2026
Captures the load-bearing facts a runtime profile of #1679 will then
quantify: every Mutex::lock() site reachable from drain_parallel is
enumerated, the per-thread Vec mitigation from #1680 is shown to be
contention-free in steady state, and three alternative designs (single
Mutex, per-thread Vec, lock-free MPSC) are compared with file:line
citations. Recommends deferring #1681 until #1679 measures the sharded
design at W=32 / 64.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a Criterion bench in crates/transfer/benches that compares three
rayon dispatch shapes - `into_par_iter` over an owned Vec, `par_bridge`
over a Vec iterator, and `par_bridge` over a pure generator - across
{1, 4, 8, 16} workers on a fixed 100K small-file workload. Throughput
is reported in items/sec via `Throughput::Elements`. The numbers feed
the dispatch-shape decisions tracked in #1284, #1370, and #1681.
oferchen added a commit that referenced this pull request May 18, 2026
…ems (#4203)

Add a criterion bench that compares per-item send+recv cost across
`std::sync::mpsc::channel`, `crossbeam_channel::unbounded`, and
`crossbeam_channel::bounded(1024)` at 100K items. Sweeps payload sizes
{32 B, 256 B, 4 KB} and thread shapes {1S+1R, 4S+1R, 1S+4R, 4S+4R} to
expose the contention regimes that appear in the engine and receiver
pipelines. Payloads are pre-allocated outside the timed section so the
measurement isolates channel cost from allocation. Throughput is
reported via `Throughput::Elements(100_000)` so the criterion summary
gives items/sec directly.

Pure userspace synchronisation - no I/O, no platform-specific paths,
runs identically on Linux, macOS, and Windows.

Refs #1592 #1681 #1370
oferchen added a commit that referenced this pull request May 18, 2026
Design note for the lock-free MPSC variant of
WorkQueueReceiver::drain_parallel. Sketches the crossbeam_channel
swap, documents the ordering contract delegated to ReorderBuffer,
defines the 20% threshold on the #4214 drain_parallel_alternatives
bench that gates the migration, and lays out a feature-flag rollout
plan. Recommendation is to defer the implementation until the
#4214 numbers land on the reference host. Cross-refs #4170, #4173,
#4203, #4214.
oferchen added a commit that referenced this pull request May 18, 2026
Adds drain_parallel_alternatives benchmark comparing three fan-in
strategies on the WorkQueueReceiver drain path: the current sharded
Mutex<Vec> indexed by rayon thread index, a per-thread Vec with final
concat (no mutex), and a crossbeam_channel MPSC drain. Runs at 10K and
100K items across 4, 8, and 16 rayon workers, reporting throughput in
elements per second so reviewers can compare per-iteration cost
directly.

Pre-allocates DeltaWork items outside the timed section, isolates each
worker count in a private rayon pool, and shares the same simulated
per-item compute across strategies so the only delta between groups is
the collector itself. Closes the measurement gap that #1681 needs to
decide whether the current sharded Mutex<Vec> warrants replacement
(#1682, refs #4170 / #4173 / #4203).
oferchen added a commit that referenced this pull request May 18, 2026
Adds a Criterion bench in crates/transfer/benches that compares three
rayon dispatch shapes - `into_par_iter` over an owned Vec, `par_bridge`
over a Vec iterator, and `par_bridge` over a pure generator - across
{1, 4, 8, 16} workers on a fixed 100K small-file workload. Throughput
is reported in items/sec via `Throughput::Elements`. The numbers feed
the dispatch-shape decisions tracked in #1284, #1370, and #1681.
oferchen added a commit that referenced this pull request May 18, 2026
…ems (#4203)

Add a criterion bench that compares per-item send+recv cost across
`std::sync::mpsc::channel`, `crossbeam_channel::unbounded`, and
`crossbeam_channel::bounded(1024)` at 100K items. Sweeps payload sizes
{32 B, 256 B, 4 KB} and thread shapes {1S+1R, 4S+1R, 1S+4R, 4S+4R} to
expose the contention regimes that appear in the engine and receiver
pipelines. Payloads are pre-allocated outside the timed section so the
measurement isolates channel cost from allocation. Throughput is
reported via `Throughput::Elements(100_000)` so the criterion summary
gives items/sec directly.

Pure userspace synchronisation - no I/O, no platform-specific paths,
runs identically on Linux, macOS, and Windows.

Refs #1592 #1681 #1370
oferchen added a commit that referenced this pull request May 18, 2026
Design note for the lock-free MPSC variant of
WorkQueueReceiver::drain_parallel. Sketches the crossbeam_channel
swap, documents the ordering contract delegated to ReorderBuffer,
defines the 20% threshold on the #4214 drain_parallel_alternatives
bench that gates the migration, and lays out a feature-flag rollout
plan. Recommendation is to defer the implementation until the
#4214 numbers land on the reference host. Cross-refs #4170, #4173,
#4203, #4214.
oferchen added a commit that referenced this pull request May 18, 2026
Adds drain_parallel_alternatives benchmark comparing three fan-in
strategies on the WorkQueueReceiver drain path: the current sharded
Mutex<Vec> indexed by rayon thread index, a per-thread Vec with final
concat (no mutex), and a crossbeam_channel MPSC drain. Runs at 10K and
100K items across 4, 8, and 16 rayon workers, reporting throughput in
elements per second so reviewers can compare per-iteration cost
directly.

Pre-allocates DeltaWork items outside the timed section, isolates each
worker count in a private rayon pool, and shares the same simulated
per-item compute across strategies so the only delta between groups is
the collector itself. Closes the measurement gap that #1681 needs to
decide whether the current sharded Mutex<Vec> warrants replacement
(#1682, refs #4170 / #4173 / #4203).
oferchen added a commit that referenced this pull request Aug 24, 2026
Captures the load-bearing facts a runtime profile of #1679 will then
quantify: every Mutex::lock() site reachable from drain_parallel is
enumerated, the per-thread Vec mitigation from #1680 is shown to be
contention-free in steady state, and three alternative designs (single
Mutex, per-thread Vec, lock-free MPSC) are compared with file:line
citations. Recommends deferring #1681 until #1679 measures the sharded
design at W=32 / 64.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds a Criterion bench in crates/transfer/benches that compares three
rayon dispatch shapes - `into_par_iter` over an owned Vec, `par_bridge`
over a Vec iterator, and `par_bridge` over a pure generator - across
{1, 4, 8, 16} workers on a fixed 100K small-file workload. Throughput
is reported in items/sec via `Throughput::Elements`. The numbers feed
the dispatch-shape decisions tracked in #1284, #1370, and #1681.
oferchen added a commit that referenced this pull request Aug 24, 2026
…ems (#4203)

Add a criterion bench that compares per-item send+recv cost across
`std::sync::mpsc::channel`, `crossbeam_channel::unbounded`, and
`crossbeam_channel::bounded(1024)` at 100K items. Sweeps payload sizes
{32 B, 256 B, 4 KB} and thread shapes {1S+1R, 4S+1R, 1S+4R, 4S+4R} to
expose the contention regimes that appear in the engine and receiver
pipelines. Payloads are pre-allocated outside the timed section so the
measurement isolates channel cost from allocation. Throughput is
reported via `Throughput::Elements(100_000)` so the criterion summary
gives items/sec directly.

Pure userspace synchronisation - no I/O, no platform-specific paths,
runs identically on Linux, macOS, and Windows.

Refs #1592 #1681 #1370
oferchen added a commit that referenced this pull request Aug 24, 2026
Design note for the lock-free MPSC variant of
WorkQueueReceiver::drain_parallel. Sketches the crossbeam_channel
swap, documents the ordering contract delegated to ReorderBuffer,
defines the 20% threshold on the #4214 drain_parallel_alternatives
bench that gates the migration, and lays out a feature-flag rollout
plan. Recommendation is to defer the implementation until the
#4214 numbers land on the reference host. Cross-refs #4170, #4173,
#4203, #4214.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds drain_parallel_alternatives benchmark comparing three fan-in
strategies on the WorkQueueReceiver drain path: the current sharded
Mutex<Vec> indexed by rayon thread index, a per-thread Vec with final
concat (no mutex), and a crossbeam_channel MPSC drain. Runs at 10K and
100K items across 4, 8, and 16 rayon workers, reporting throughput in
elements per second so reviewers can compare per-iteration cost
directly.

Pre-allocates DeltaWork items outside the timed section, isolates each
worker count in a private rayon pool, and shares the same simulated
per-item compute across strategies so the only delta between groups is
the collector itself. Closes the measurement gap that #1681 needs to
decide whether the current sharded Mutex<Vec> warrants replacement
(#1682, refs #4170 / #4173 / #4203).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant