google / leveldb

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
BSD 3-Clause "New" or "Revised" License
36.29k stars 7.8k forks source link

Consider Profile-Guided Optimiazation tuning #1133

Open zamazan4ik opened 1 year ago

zamazan4ik commented 1 year ago

Hi!

Recently I applied Profile-Guided Optimization on RocksDB ang got interesting results on the db_bench (a benchmarking tool from RocksDB):

Release:

DB path: [/tmp/rocksdbtest-1000/dbbench]
readrandom   :       8.306 micros/op 120392 ops/sec 180.002 seconds 21670999 operations;    8.4 MB/s (13694547 of 21670999 found)

Release + PGO:

DB path: [/tmp/rocksdbtest-1000/dbbench]
readrandom   :       7.415 micros/op 134862 ops/sec 180.006 seconds 24275999 operations;    9.4 MB/s (15344319 of 24275999 found)

I think the same optimization technique can be useful for LevelDB as well.