Storage · Compression
ZSTD
Cheat sheet · https://pcornel.dk/topic.php?topic=4308
Answer
ZSTD (Zstandard) is a lossless compression algorithm with adjustable levels, giving better ratios than LZ4 at moderate CPU cost. It is used in ZFS, Btrfs, backup tools and Linux kernels.
Remember
- ZSTD has adjustable levels.
- Higher levels give better ratio and cost CPU.
- Good for backups and archives.
First checks
zfs set compression=zstd-3 <ds>— ZFS zstd levelzstd -b3 -e9 <file>— benchmark levelsmount -o compress=zstd:3— Btrfs
Commands
zpool get feature@zstd_compresszfs send -czfs set compression=zstd-3 tank/datamount -o compress=zstd:3
Verify in this order
data → ZSTD level n → stored
Where it usually breaks
First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4308