Btrfs Zstd Compression Benchmarks On Linux 4.14
Of the many new features in Linux 4.14, one of the prominent additions is initial support for Zstd compression that is initially wired in for transparent file-system compression with SquashFS and Btrfs. Here are some benchmarks of Zstd Btrfs compression compared to the existing LZO and Zlib compression mount options.
Facebook's Zstd compression support within the Linux kernel is enabled under Linux 4.14 if the CONFIG_ZSTD_COMPRESS and CONFIG_ZSTD_DECOMPRESS options are enabled.
Enabling the support for Btrfs with Linux 4.14+ is as easy as mounting the Btrfs file-system with -o compress=zstd, similar to compress=lzo and compress=zlib options with existing kernel releases.
Looking at the dmesg output will also indicate whether Zstd compression is being used by Btrfs.
For this round of testing, a Toshiba TR-150 SATA 3.0 SSD was used and freshly formatted between each round of tests. Btrfs on Linux 4.14 was tested stock without any compression and then testing with LZO, Zlib, and Zstd with the freshly formatted solid-state drive each time. A variety of disk benchmarks were run via the Phoronix Test Suite and also plotting the CPU usage each time.