Cassandra

Memtable Flush Storms Blocking Write Path

warning
Resource ContentionUpdated Oct 10, 2025

Excessive cassandra_memtable_switch and cassandra_table_pending_flushes indicate memtables are flushing too frequently, consuming I/O bandwidth and creating write latency spikes. This often results from undersized memtables or write bursts.

How to detect:

Monitor cassandra_memtable_switch showing frequent spikes and cassandra_table_pending_flushes accumulating above baseline. Correlate with cassandra_client_request_write_time_50p increasing and cassandra_write_timeouts rising. Check cassandra_memtable_live_data_size patterns for rapid growth followed by drops.

Recommended action:

Review memtable_heap_space_in_mb and memtable_offheap_space_in_mb settings in cassandra.yaml. Increase these values if sufficient memory exists. Check disk I/O capacity during flush storms with iostat. If write patterns are bursty, consider increasing memtable_flush_writers. Optimize schema to reduce write amplification (avoid wide partitions). If sustained, scale cluster horizontally.