leveldb icon indicating copy to clipboard operation
leveldb copied to clipboard

Write Amplification factor for small key-values with frequent writes to levelDB

Open bhogi50 opened this issue 1 year ago • 0 comments

Hi Team,

I am facing a serious issue with write amplification. Consider, There are key-values that will write to levelDB for every 5 seconds. Those key-values are always batched into a write_batch object and then written to levelDB using leveldb_write() for every 5 sec. You can assume total size of key-values will be 500 bytes.

With leveldb ( sync = false ) , I am getting eMMC write count of 221 writes. where, If I write values directly into eMMC by maintaining some offsets for each value, I am getting eMMC write count of 70 writes.

The difference is Huge. Is there any way to optimize leveldb eMMC write count ? FYI, I tried all options available in Options.h file.

bhogi50 avatar Sep 01 '23 03:09 bhogi50