Larger recordsize Causes Worse Compression #18423
-
|
Based on extensive research across the internet, it seems that larger recordsize values allow for greater performance and efficiency due to less blocks to read/write, and less metadata overhead. The recordsize seems to be variable and data-blocks for files smaller than the recordsize are stored in the same-size recordsizes as the file or 1 larger, with tail-packing for the final recordsize. It is also apparent that larger recordsize values allow for higher compression-ratios; however, this is not the case on my system. After hours of testing, I am able to reliably reproduce the following results (compression-levels above 1 do not improve compression-ratio in my dataset beyond around 0.03x):
A new dataset was created to test different values, with it being completely erased of both files and snapshots before the recordsize value was changed. My dataset is comprised of image-files with an average size of 192 kiB. How is it that the results are as such? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
For files smaller than recordsize zfs uses smaller blocks, so it does not depend on the tail compression. I wonder whether your data are compressible at all, or what you see are the tails. |
Beta Was this translation helpful? Give feedback.
Because files of only one block/record don't need tail compression. Of two or more -- do need, and it is this compression you see.