My RocksDB is a recent version.
With
cache_index_and_filter_blocks =true
pin_l0_filter_and_index_blocks_in_cache = true,
I am seeing very large 26GB rocksdb.block-cache-usage while at the same time, the rocksdb.estimate-table-readers-mem is only 10k.
Does it mean all SST’s index and filters are stored in block cache and their total is only 10k? Or only top level index and filters are 10k and the bulk of index/filter data in block cache are not reflected in rocksdb.estimate-table-readers-mem?
calling rocksdb.estimate-table-readers-mem when cache_index_and_filter_blocks =true returns the size of the table readers which is not in the block cache. you can set that to false and then see how much memory the table readers take up.
from include/rocksdb/db.h:
// "rocksdb.estimate-table-readers-mem" - returns estimated memory used for
// reading SST tables, excluding memory used in block cache (e.g.,
// filter and index blocks).
static const std::string kEstimateTableReadersMem;