Zstd Compression For Btrfs & Squashfs Set For Linux 4.14, Already Used Within Facebook
As we've been expecting, Zstd compression for Btrfs is coming with the Linux 4.14 along with Zstd support in SquashFS.
Zstd/Zstandard was developed at Facebook and offers compression similar to zip/gzip but with faster speeds for both compression and decompression. With Btrfs also being developed and used heavily at Facebook, it was their logical next step adding Zstd support to Btrfs alongside the gzip and LZO transparent compression support already present.
Chris Mason of Facebook today sent in the zstd pull request adding this compression algorithm to the kernel itself followed by wiring it in for Btrfs and SquashFS.
It's also mentioned that this functionality is already being used within production use-cases at Facebook. "zstd is a big win in speed over zlib and in compression ratio over lzo, and the compression team here at FB has gotten great results using it in production. Nick will continue to update the kernel side with new improvements from the open source zstd userland code."
The zstd compression support is around 3.5k lines of code while decompression comes in at about 2.5k, for the main C files, while all in this pull request is just shy of 15k lines of code. And yes, I'll have some fresh Btrfs compression benchmarks once the merge window is over.