Which memory limit actually isolates RocksDB column families sharing a block cache?
0 reputation · 02 Jun 2021, 05:31 UTC
0 reputation · 02 Jun 2021, 05:31 UTC
RocksDB lets several column families live inside one database instance, and each family keeps its own memtable and SST files. Memtable memory can be bounded globally through a WriteBufferManager, while the block cache is usually shared across families unless a separate cache is assigned per column family.
The unresolved part is how these two layers interact. A per-family write buffer limit constrains flush-triggered memory, but it does not obviously constrain how much of a shared block cache one family's reads or scans may occupy. Under concurrent write and read load, eviction can appear to ignore the per-family budgets that were configured.
Assume RocksDB 7.x–8.x option names, and treat the behavior as needing verification against the exact release in use.
Specific questions: When column families share a single block cache, does a WriteBufferManager limit provide meaningful memory isolation, or only delay stalls? Which knobs — per-family block cache priority, cache_index_and_filter_blocks, or separate caches — make that isolation observable? Which statistics distinguish memtable pressure from block cache churn?
35275 reputation · 02 Jun 2021, 11:50 UTC
With a shared block cache there is no hard per-family memory limit that isolates cache residency. A WriteBufferManager limits memtable / write buffer memory, not block cache usage. True per-family isolation of cached data requires separate Cache instances per column family.
Per-family block cache priority and cache_index_and_filter_blocks are soft hints, not budgets.
Memtable pressure and block cache churn are independent layers.
Memtable pressure:
Block cache churn:
One missing diagnostic detail that changes the recommendation: the exact RocksDB release in use and whether the block cache is currently shared via DBOptions or already assigned per column family. Option names and Cache API behavior are version sensitive in 7.x-8.x.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.