2 ms·
Try this: time tar -cf /usr/share/doc |gzip |wc -c vs. time tar -cf /usr/share/doc |zstd |wc -c repeat a few times to warm up your disk cache if needed. On mi
by derekp7 3y ago
Try this:
time tar -cf /usr/share/doc |gzip |wc -c
vs.
time tar -cf /usr/share/doc |zstd |wc -c
repeat a few times to warm up your disk cache if needed. On mine host (with an nvme disk), zstd was about slightly better compression ratio than gzip, but took 1 second instead of 9 seconds to compress. Compare against something like lzop, which is about the same speed, but produces much worse compression.
Of course, with gzip if you have multiple cores you have the option of using pigz which bring the wall-clock time of gzip down to comparable to zstd and lzop.
- silverquiet 3y agoThank you - that's a great, simple test.
- loeg 3y ago> with gzip if you have multiple cores you have the option of using pigz which bring the wall-clock time of gzip down to comparable to zstd and lzop. (But then you should use zstd -T0 for an apples to apples comparison.)