I installed on Debian Wheezy zfs-fuse file system and enabled compression gzip-9 on one dataset (storage/backup). When I check if the compression is enabled on this dataset, it shows YES:$: zfs get compression storage/backupNAME         PROPERTY     VALUE     SOURCEstorage/backup  compression  gzip-9    localHowever, when I check the compression rate with du -ah or with sfx get compressratio no any compression can be seen.All files, including well compressible ones (e.g. text files), take up exactly the same disk size as uncompressed ones:$: zfs get compressratio storage/backupNAME         PROPERTY       VALUE  SOURCEstor/backup  compressratio  1.00x  -Why does this situation occur?Here some info from zfs get all about the dataset:compressratio         1.00x                  -mounted               yes                    -quota                 none                   defaultreservation           none                   defaultrecordsize            128K                   defaultmountpoint            /storage/backup        defaultsharenfs              off                    defaultchecksum              on                     defaultcompression           gzip-9                 localatime                 on                     defaultdevices               on                     default
zfs-fuse: enabling compression has no effect
debian;compression;zfs;fuse
It looks like zfs-fuse will update the compressratio data every 30 seconds with limited IO occurring but there is another trigger to the update as background IO or really large files cause the data update to occur sooner. I've put some test functions up on a gist. They require a clean (no files) file system that will start at 1.00x.If the scripts pause forever on the first test then your compression counters are never updating and you have an issue with your install. Running the scripts on a Debian wheezy box:$ uname -aLinux zfs-fuse 3.2.0-4-686-pae #1 SMP Debian 3.2.54-2 i686 GNU/LinuxResults in the following:$ test_compression compressTesting [compress]Testing size [4096]Waited 0 seconds for [compressratio_is_one]4096 bytes made up of 1*4096 blocksWaited 20 seconds for [compresstario_is_not_one]1.12xTesting size [16384]Waited 30 seconds for [compressratio_is_one]16384 bytes made up of 1*16384 blocksWaited 30 seconds for [compresstario_is_not_one]1.53xTesting size [1048576]Waited 30 seconds for [compressratio_is_one]1048576 bytes made up of 1*131072 blocksWaited 30 seconds for [compresstario_is_not_one]31.44xTesting size [33161216]Waited 30 seconds for [compressratio_is_one]33161216 bytes made up of 255*131072 blocksWaited 0 seconds for [compresstario_is_not_one]202.31xYou can reduce this, normally by about half by doing something intensive in the background which probably triggers the counter update. In the background$ while true; do touch somefile; rm somefile; doneThen testing again:$ test_compression compressTesting [compress]Testing size [4096]Waited 0 seconds for [compressratio_is_one]4096 bytes made up of 1*4096 blocksWaited 5 seconds for [compresstario_is_not_one]1.11xTesting size [16384]Waited 17 seconds for [compressratio_is_one]16384 bytes made up of 1*16384 blocksWaited 17 seconds for [compresstario_is_not_one]1.50xTesting size [1048576]Waited 16 seconds for [compressratio_is_one]1048576 bytes made up of 1*131072 blocksWaited 10 seconds for [compresstario_is_not_one]29.73xTesting size [33161216]Waited 0 seconds for [compressratio_is_one]33161216 bytes made up of 244*131072 blocksWaited 0 seconds for [compresstario_is_not_one]201.35xOf note, on FreeBSD the update happens ~ every 5 seconds:$ test_compression giggidy/compressTesting [giggidy/compress]Testing size [4096]Waited 0 seconds for [compressratio_is_one]4096 bytes made up of 1*4096 blocksWaited 4 seconds for [compresstario_is_not_one]1.21xTesting size [16384]Waited 5 seconds for [compressratio_is_one]16384 bytes made up of 1*16384 blocksWaited 5 seconds for [compresstario_is_not_one]1.91xTesting size [1048576]Waited 5 seconds for [compressratio_is_one]1048576 bytes made up of 1*131072 blocksWaited 5 seconds for [compresstario_is_not_one]39.33xTesting size [33161216]Waited 5 seconds for [compressratio_is_one]33161216 bytes made up of 1*131072 blocksWaited 4 seconds for [compresstario_is_not_one]114.25xI will add a Solaris based example when I can get on a box. 