Cassandra: memtable_offheap_space_in_mb and memtable_cleanup_threshold

cassandra

I use C* v2.1.2 do write only workload (into one column family) and experiment with offheap-objects memtable space.

I set parameters to:

memtable_offheap_space_in_mb = 51200  # 50Gb
memtable_cleanup_threshold = 0.99

and expect that flush will not be triggered until available memtable offheap space reaches ~50Gb. But flushes are triggered
before that limit. System monitor shows that in used only ~16Gb at that moment (linux+jvm+heap+…).

Why such thing is happened?

Best Answer

Memtable flush happens in 3 ways
1. When memtable_offheap_space_in_mb size is exceeded.
2. When commitlog_total_space_in_mb size is exceeded.
3.When forcefully Nodetool flush commend is executed.
In your case I'm guess for second reason that flush happened. For more you can check this. http://academy.datastax.com/courses/understanding-cassandra-write-path/understanding-memtables-and-commitlog