Skip to content

docs: warn users about SSH+rsync double-compression in README (SSC-2) - #4655

Merged
oferchen merged 1 commit into
masterfrom
docs/ssh-double-compression-ssc2
May 21, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/ssh-double-compression-ssc2

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Adds a Performance tuning subsection to README.md and a NOTES section to docs/oc-rsync.1.md explaining the SSH-plus-rsync double-compression pitfall: when SSH stream compression (ssh -C, or Compression yes in ~/.ssh/config / /etc/ssh/ssh_config) runs together with oc-rsync --compress / -z, every byte gets compressed twice. The second pass burns CPU on both peers and shrinks the stream by almost nothing; on CPU-bound hosts throughput typically drops by 20-40%.

The new copy:

  • Explains what each layer does and why combining them is wasteful.
  • Recommends picking one layer, with a default preference for rsync's own --compress (zstd when negotiated, faster than SSH's zlib stream, suffix-skippable via --skip-compress).
  • Notes that oc-rsync emits a one-line warning when it spots -C or -o Compression=yes in the --rsh / -e argv it builds (the SSC-1 / feat: wire atime and crtime preservation into generator file list building #2561 detector), but does not parse ssh_config, so users should also check those files when SSH transfers look CPU-bound.
  • Cross-links the new NOTES section from the -z / --compress man-page entry.

Docs-only change. No code edits, no new dependencies.

Companion tasks

Test plan

  • cargo fmt --all -- --check clean (docs-only; no-op expected).
  • cargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings clean (docs-only; no-op expected).
  • Visually inspected the README rendering and the man-page Markdown to confirm tone, formatting, and section placement match the surrounding sections.

Add a Performance tuning subsection in README.md and a NOTES section
in docs/oc-rsync.1.md explaining why combining SSH stream compression
(ssh -C / Compression yes) with rsync wire compression (-z) wastes
CPU on already-compressed bytes.

Calls out that the startup warning only sees -C / -o Compression=yes
in the SSH argv and cannot detect Compression yes set in
~/.ssh/config or /etc/ssh/ssh_config, so users should also check
those files when an SSH transfer looks CPU-bound.
@oferchen
oferchen force-pushed the docs/ssh-double-compression-ssc2 branch from cac246d to 0cc8066 Compare May 21, 2026 08:27
@oferchen
oferchen merged commit edf73e9 into master May 21, 2026
9 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 21, 2026
@oferchen
oferchen deleted the docs/ssh-double-compression-ssc2 branch May 21, 2026 14:09
oferchen added a commit that referenced this pull request May 21, 2026
… detection (#4674)

Compares four candidate crates (ssh2-config, ssh2-config-rs, ssh_config,
russh-config) against a roll-our-own option and the status quo of argv-only
detection plus README guidance. Recommends SKIP: upstream rsync does not parse
ssh_config either, the missed case is rare (OpenSSH Compression defaults off),
and SSC-1 (#4667) + SSC-2 (#4655) already cover the explicit and educated paths.
Lists the conditions that would reverse the decision.
oferchen added a commit that referenced this pull request Aug 24, 2026
…#4655)

Add a Performance tuning subsection in README.md and a NOTES section
in docs/oc-rsync.1.md explaining why combining SSH stream compression
(ssh -C / Compression yes) with rsync wire compression (-z) wastes
CPU on already-compressed bytes.

Calls out that the startup warning only sees -C / -o Compression=yes
in the SSH argv and cannot detect Compression yes set in
~/.ssh/config or /etc/ssh/ssh_config, so users should also check
those files when an SSH transfer looks CPU-bound.
oferchen added a commit that referenced this pull request Aug 24, 2026
… detection (#4674)

Compares four candidate crates (ssh2-config, ssh2-config-rs, ssh_config,
russh-config) against a roll-our-own option and the status quo of argv-only
detection plus README guidance. Recommends SKIP: upstream rsync does not parse
ssh_config either, the missed case is rare (OpenSSH Compression defaults off),
and SSC-1 (#4667) + SSC-2 (#4655) already cover the explicit and educated paths.
Lists the conditions that would reverse the decision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant