How to set a non default zstd compression level at btrfs filesystem defragment?

Kernel 5.1 added ZSTD level support. I tested it with rc1 today using a mount option compress=zstd:12 in /etc/fstab. The default level is 3. To be clear: The change affects only files that are written after this mount command. Some benchmark results: https://lkml.org/lkml/2019/1/28/1930


Not yet (December 28th, 2017) possible:

Q: Can I set the compression level?

A: …, ZSTD level support is planned.

source: https://btrfs.wiki.kernel.org/index.php/Compression


Try:

$> sudo mount -o remount,compress=zlib:9,compress=zstd /

After that command 'findmnt' displays 'compress=zstd:9' mount option :)

Tags:

Btrfs

Zstd