Real space in BlueStore: min_alloc_size, padding and compression
In the book: Chapter 12
Real space in BlueStore: min_alloc_size, padding and compression
Change the object size, the pool type and min_alloc_size and see how much raw disk a small object really takes; then watch BlueStore's compression acceptance test on one blob.
One object's shards or replicas
Solid: data (blue) or parity (purple) · red hatching: space lost to the min_alloc_size boundary or padding.
Compression acceptance test
Rejected: stored uncompressed
want = roundup(64 KiB × 0.875, 64 KiB) = 64 KiB
result = roundup(50 KiB, 64 KiB) = 64 KiB
stored uncompressed: 64 KiB (compress_rejected_count++)
min_alloc_size is fixed when the OSD is created, and OSDs built before Pacific may still have 64K; check with ceph osd metadata. For millions of small objects, classic EC can cost more than three replicas (chapter 12).
Follows:
src/common/options/global.yaml.in :: bluestore_min_alloc_size_hdd, bluestore_min_alloc_size_ssd, bluestore_compression_required_ratioAllocation and compression defaultssrc/os/bluestore/BlueStore.cc :: BlueStore::_do_alloc_write (want_len, result_len)The compression acceptance testsrc/common/options/mon.yaml.in :: osd_pool_erasure_code_stripe_unit (4K, or 16K with allow_ec_optimizations)The EC stripe_unit