facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
27.85k stars 6.2k forks source link

memtable_prefix_bloom_ratio vs SST bloom filters #12745

Closed zaidoon1 closed 3 weeks ago

zaidoon1 commented 4 weeks ago

For a workload that is read heavy and most lookups (over 99%) are for keys that don't exist. Is there any benefit in enabling memtable_prefix_bloom_ratio if SST bloom filters are already enabled? Is it expected that I see an improvement?

ajkr commented 4 weeks ago

SST bloom filter typically has more obvious improvements by saving I/Os. Memtable filter may help with CPU efficiency only. You could try it, or if the memtable lookup CPU is low enough already, it might not be worthwhile to optimize.

zaidoon1 commented 4 weeks ago

got it, thank you! I'll keep this ticket open for now and will report back on the results I see for posterity

zaidoon1 commented 3 weeks ago

so enabled memtable prefix bloom ratio and as you suspected, there is not much of a difference. Thanks for the help!