5

I have been using LMDB to store key value pairs where the value sizes are of the order 200 Bytes. I am running into a scenarios where value sizes could grow upto 8KB or more.

According to: https://lmdb.readthedocs.io/en/release/#storage-efficiency-limits and https://github.com/lmdbjava/benchmarks/blob/master/results/20160710/README.md, LMDB is most efficient for value sizes in page size (4096KB) increments, otherwise it can lead to fragmentation due to overflow pages.

My main questions are:

  1. Do I need to break down my value into page size increments for optimal performance?
  2. Are lexicographic sorted keys in LMDB placed in adjacent pages? Let's say my value is about 14KB and I break it down into 8K, 4K and 2K chunks, with key values :key_chunk1, key_chunk_2, key_chunk_3, will they be in adjacent pages? Let's say the last chunk (The 2KB value) is on a new page, and the next lexicographically sorted key is of 4K, will this be in a new page as it cannot fit in the existing page?
appRealm
  • 51
  • 3

0 Answers0