Why is the LMDB larger than the actual data size?

I put 11K and amp; into the LMDB base; The LMDB database file size becomes 21Mb.

For the same data, leveldb only accepts 8MB (with instant compression).

Information about LMDB env,

VERSION=3
format=bytevalue
type=btree
mapsize=1073741824
maxreaders=126
db_pagesize=4096

      

To check why the LMDB file is larger, I iterated over all the keys and values ​​inside the database. The total size of all keys and values ​​is 10 MB.

But the actual file size is 21 MB. The remaining 11Mb (21Mb - 10Mb) file size is used for some purpose ??? !!.

If I compress the data before the input operation, only 2MB has decreased

Why is the LMDB database file size larger than the actual data size?

Any way to reduce it?

+3


source to share





All Articles