Write stall activation criteria for mutable memtable memory limits
26.5K reputation · 20 Apr 2022, 08:46 UTC
When configuring RocksDB, the write stall mechanism is designed to pause writes when memory pressure from mutable memtables exceeds configured limits. The documentation states that a stall occurs if the total memory used by all mutable memtables surpasses write_buffer_limit or if the number of immutable memtables awaiting flush reaches max_write_buffer_number. However, it is unclear whether the stall evaluation considers the aggregate size of mutable memtables only, or also checks each individual memtable against write_buffer_size. Additionally, the interaction between max_write_buffer_number and min_write_buffer_number_to_merge in triggering stalls is not explicitly detailed.
Understanding the precise condition that initiates a stall is important for tuning write throughput without risking out‑of‑memory situations.
Does the stall trigger when the cumulative size of all mutable memtables exceeds write_buffer_limit, regardless of the size of any single memtable?
Does max_write_buffer_number influence the stall threshold independently of total memtable memory?
Is the stall condition evaluated per memtable or only on the aggregate mutable memtable usage?