[ceph-users] Compression never better than 50%
Ragan, Tj (Dr.)
tj.ragan at leicester.ac.uk
Wed Mar 13 04:55:15 PDT 2019
I’ve been investigating compression and (long-story-short,) found that I can never get better than 50% compression ratio.
OSDs: Bluestore, Sparse files looped to /dev/loop0, lvm to create logical volumes. bluestore_compression_mode: passive
Pool: 3-replica, compression_mode: force, compression_algorithm: zstd
Data: dd if=/dev/zero of=dd_test bs=2M count=1
Before addition to rados there are zero objects in the pool and, perf dump of one of the osds contains:
And after `sudo rados -p rep3_testing put dd_test dd_test`, `rados ls` shows only the one object, and the same osd as above contains:
… which means that the bluestore_stored went up by 2097152 bytes (exactly the file size of dd_test) and the bluestore_stored went up by 1048576 - which is exactly half as much. (Note that these numbers are the same as the bluestore_compressed_* values.) When I repeated this test using zlib or snappy, I got exactly 50% compression with both as well. If instead I use the zstd command line program, this file ends up being just 207 bytes - which is what you’d expect for a file of just zeros.
Please can explain why I'm not getting better compression, or ideally tell me I’ve forgotten a setting and which setting I need to change?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ceph-users