Repository navigation
docs: warn users about SSH+rsync double-compression in README (SSC-2) - #4655
Merged
Merged
Conversation
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
force-pushed
the
docs/ssh-double-compression-ssc2
branch
from
May 21, 2026 08:27
cac246d to
0cc8066
Compare
4 tasks done
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.
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 a Performance tuning subsection to
README.mdand a NOTES section todocs/oc-rsync.1.mdexplaining the SSH-plus-rsync double-compression pitfall: when SSH stream compression (ssh -C, orCompression yesin~/.ssh/config//etc/ssh/ssh_config) runs together withoc-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:
--compress(zstd when negotiated, faster than SSH's zlib stream, suffix-skippable via--skip-compress).oc-rsyncemits a one-line warning when it spots-Cor-o Compression=yesin the--rsh/-eargv it builds (the SSC-1 / feat: wire atime and crtime preservation into generator file list building #2561 detector), but does not parsessh_config, so users should also check those files when SSH transfers look CPU-bound.-z/--compressman-page entry.Docs-only change. No code edits, no new dependencies.
Companion tasks
ssh_configparser so the warning can also fire on the config-only case this doc has to ask users to check manually.project_ssh_compression_no_config_parse.mdin the project memory log captures the underlying gap and why a parser is not yet on the critical path.Test plan
cargo fmt --all -- --checkclean (docs-only; no-op expected).cargo clippy --workspace --all-targets --all-features --no-deps -- -D warningsclean (docs-only; no-op expected).