ZStandard as file compression option in BTRFS

Tell us what new features you'd love to see or any upgrades you think we should make!
Post Reply
User avatar
4lpha0ne
Posts: 3
Joined: 26 Nov 2023, 15:50

ZStandard as file compression option in BTRFS

Post by 4lpha0ne »

Hi, I love to have the file system compression option in TOS5 with BTRFS. It is also good to have a compression level option for ZLib (which is being used as I checked via SSH). Their use in BTRFS is documented here:
https://btrfs.readthedocs.io/en/latest/Compression.html

There are lots of charts online, where one can see, that ZStandard will compress and decompress much faster than ZLib at the same compression rates, which might avoid bottlenecks when writing on HDDs or SSDs in a RAID with combined write throughput of >300 MB/s.

The easiest way of implementing this I can imagine would be to change the compression level options from 1, 2, 3... to combinations like ZLIB-1, ZLIB-2,.. ZStd-1, etc.

Or is there a way to modify the way how the volume is mounted and provide the compression method there?
User avatar
TMroy
TM Support
Posts: 3060
Joined: 10 Mar 2020, 14:04
China

Re: ZStandard as file compression option in BTRFS

Post by TMroy »

Thank you! we will add it to the wish list.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
4lpha0ne
Posts: 3
Joined: 26 Nov 2023, 15:50

Re: ZStandard as file compression option in BTRFS

Post by 4lpha0ne »

TMroy wrote: 27 Nov 2023, 14:45 Thank you! we will add it to the wish list.
Sounds good! Thank you very much!

I also looked for some more tests of all of the BTRFS compression method options, and it looks like LZO might also be useful for some scenarios.
User avatar
never75
Posts: 3
Joined: 19 Apr 2025, 19:23
Italy

Re: ZStandard as file compression option in BTRFS

Post by never75 »

Hi,
Tahnks for the continuos updates to TOS . I bought a F8 nas and i am exploring the possibility to compress files to save money on expensive SSD and preserve their life, by reducing the amount of date written.

I checked the current version of TOS6 and compression is listed possible with level between 1 to 6 with 4 being default.
I get from the previous message that TOS6 use Zlib which has level from 1 to 9.

Can you confirm that level 1 to 6 listed in TOS6 map to level 1 to 6 of Zlib? If so, I understand why levels 7 to 9 have not been added. I believe because of the minimal, if any improvement, and the impact on the low power CPU used in nas system.

Also, any update on being able to use different compression algorithm like Zstandard?
User avatar
TMzethar
TM Support
Posts: 2819
Joined: 27 Oct 2020, 16:43

Re: ZStandard as file compression option in BTRFS

Post by TMzethar »

never75 wrote: 26 Apr 2025, 17:06
Still under discussion and investigation.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
Post Reply

Return to “New Requests & Proposals”