Compression not working?

Joined
Jun 23, 2022
Messages
2
Hi all,

I am trying to figure out why my Truenas core is doing little to no compression. ( Compression ratio 1.00 ).

I have a pool with default settings and tried LZ4 and ZSTD.

On a Linux machine i have tried compressing the same files with ZSTD and LZ4.

---------
-rw-r--r-- 1 xx xx 34359738378 Jul 24 2022 s-t01771403-11854
-rw-r--r-- 1 xx xx 30388374089 Jul 24 2022 s-t01771403-11854.lz4
-rw-r--r-- 1 xx xx 30367332579 Jul 24 2022 s-t01771403-11854.zst

So it seems the data is pretty compressable however Truenas does not compress. Any idea's?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So it seems the data is pretty compressable however Truenas does not compress. Any idea's?
So you're asking "where's my 12%?"

You're looking at it from a whole file perspective.

ZFS looks at the block level, so it's unlikely that you'll see the same result unless your files are something like all 0 or all 1.

I'd suggest looking at this article: https://klarasystems.com/articles/openzfs1-understanding-transparent-compression/

And considering your recordsize... which may bring something closer to what you expect, but will surely not get all the way there (since your expectation seems to be whole file compression).
 
Top