-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add threads to zstd compression #424
base: master
Are you sure you want to change the base?
Conversation
Quick bump, @WayneD have you had a chance to look at this? |
@tridge Since opening this PR, I've been using this branch to copy files to a home that has a 30Mb/s internet connection. Using a high zstd compression level helps considerably, but as the level is increased, compression becomes CPU bound when only a single thread is used to compress. Here are a few benchmarks gathered using Benchmarkstest.file total size is 1,680,379,904 bytes
zstd, level 8
rsync -aiv --zc=zstd --zl=8 --zt=n --stats test.file user@server:/home/user/
--zt=1 sent 1,115,365,707 bytes received 35 bytes 40,558,754.25 bytes/sec
--zt=2 sent 1,115,364,941 bytes received 35 bytes 71,959,030.71 bytes/sec
--zt=4 sent 1,115,364,711 bytes received 35 bytes 106,225,213.90 bytes/sec
--zt=8 sent 1,115,364,645 bytes received 35 bytes 106,225,207.62 bytes/sec
--zt=16 sent 1,115,364,643 bytes received 35 bytes 82,619,605.78 bytes/sec
zstd, level 20
rsync -aiv --zc=zstd --zl=20 --zt=n --stats test.file user@server:/home/user/
--zt=1 sent 941,434,753 bytes received 35 bytes 709,178.75 bytes/sec
--zt=2 sent 941,434,339 bytes received 35 bytes 1,278,254.41 bytes/sec
--zt=4 sent 941,433,805 bytes received 35 bytes 2,186,838.19 bytes/sec
--zt=8 sent 941,433,593 bytes received 35 bytes 2,892,269.21 bytes/sec
--zt=16 sent 941,433,699 bytes received 35 bytes 3,819,203.79 bytes/sec
no compression (control)
rsync -aiv --stats test.file user@server:/home/user/
sent 1,680,790,259 bytes received 35 bytes 197,740,034.59 bytes/sec CPU info
|
Features
--compress-threads=n
--zt=n
where n is the number of threads to spawn when compressing with zstd.