[Date Prev][Date Next] [Chronological] [Thread] [Top]

LMDB space amplification



Hi list, 

Recently I have integrated lmdb into ceph , got intial results ,  I dump all records of lmdb, there are several different size key-value pairs, 

1.  key size : 45 byte, value size = 124 byte
2.  key size : 85 byte, value size = 1187 byte
3.  key size : 57 byte, value size = 135 byte
4.  key size : 64 byte, value size = 182 byte 
5.  key size : 33 byte,  value size = 4096 byte (used for real data, about 80 %)

this db contains about ~ 10000000 records, about 80 percent of records are the last key-value pairs (key size 33 byte, value size 4096 byte), I calculate size of  all key-value pairs, about 33GB , but on-disk size is about 63GB, so space amplification is ~ 2, is this amplification reasonable ? In which situation can lmdb get such large space amplification? How can I reduce this amplification?  If you need any other details , please email me , any tips will be appreciate.

Cheers,
xinxin