F2FS Data Compression Using LZO/LZ4 + Selective File Extension Handling To Land In 2020
Written by Michael Larabel in Linux Storage on 23 December 2019 at 02:09 AM EST. 13 Comments
LINUX STORAGE --
F2FS is the latest Linux file-system gaining transparent data compression support for saving on-disk space. With F2FS there are two compression algorithms supported so far plus the support of making the data compression opt-in per file or applying the compression to select file extensions(s).

Back in October I wrote about the experimental F2FS LZO/LZ4 compression support. That work has matured from just being patches on their mailing list to now being queued in the F2FS "dev" branch ahead of merging now with the Linux 5.6 kernel in early 2020.

Linux 5.6 is set to bring F2FS data compression! The implementation is similar to Btrfs' transparent/native file compression plus having some extra features. The F2FS compression support can be set using the compress_algorithm mount option currently for LZO or LZ4 algorithms. There is also a compress_log_size mount option for changing the compression cluster size. One of the interesting options though with the F2FS implementation is compress_extension and with that you can specify any arbitrary extension where F2FS should automatically attempt to compress the data.

Namely, with compress_extension you can have it to try compressing text-based files that normally offer greater compression ratios than say image files and binaries. The F2FS implementation also allows using chattr +c [file || directory] to enable compression on other arbitrary files or directories.

This F2FS compression support should be quite handy and for now can be found via the dev branch until Linux 5.6 rolls into town in early 2020.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week