You are not logged in.
Happy new year.
As I'm using Btrfs my fstab contains mount options like
rw,noatime,compress=zstd:3,ssd,space_cache,commit=120,subvolid=256,subvol=/@,subvol=@
Standard zstd compression level is 3. Do you also use this level or even more compression?
The Btrfs wiki (https://btrfs.wiki.kernel.org/index.php/SysadminGuide) states the option "compress-force" saves even more space (around 10% more). Should I set compress-force too?
Last edited by equalizer876 (2021-01-01 14:40:47)
Offline
It is either 'compress' or 'compress-force' not both.
The problem is that some files (jpg, png, mp3,...) are already compressed.
Compress will make BtrFS check if a file is compressible, if yes, the data will be sent to the compressor.
Compress-force will make BtrFS send the data immediately to the compressor. The compressor will do the check if a file is compressible, if yes, the data will be compressed.
Some say that the zstd-compressor is doing a better job than BtrFS in checking if a file is compressible, so for zstd the recommendation is to use compress-force.
Happy New Year too for you and every one reading this.
Last edited by eric (2021-01-04 14:52:10)
Offline
Thank you very much. I'll probably apply "compress-force". It wouldn't really affect the performance, would it?
Found https://btrfs.wiki.kernel.org/index.php … NT_OPTIONS
Otherwise some simple heuristics are applied to detect an incompressible file. If the first blocks written to a file are not compressible, the whole file is permanently marked to skip compression. As this is too simple, the compress-force is a workaround that will compress most of the files at the cost of some wasted CPU cycles on failed attempts. Since kernel 4.15, a set of heuristic algorithms have been improved by using frequency sampling, repeated pattern detection and Shannon entropy calculation to avoid that.
Last edited by equalizer876 (2021-01-13 18:49:48)
Offline