Hi Erick,
What is the purpose of "off heap size" & " memtable off heap size" in cassandra.yaml file. Also what is the recommended settings for "off heap" sizes ?
Hi Erick,
What is the purpose of "off heap size" & " memtable off heap size" in cassandra.yaml file. Also what is the recommended settings for "off heap" sizes ?
@satvantsingh_190085 update your post to provide the version of OSS C* or DSE that you're using on here for added clarity
@satvantsingh_190085, I am making an assumption in here that you're using DSE 6.8 and with that memtable_offheap_space_in_mb
property is deprecated and instead you're supposed to be using memtable_space_in_mb
property which is defaulted to 2048
. Description for this property is as follows,
Total permitted memory to use for memtables. When this threshold is exceeded, writes are not accepted until a flush completes. A flush is triggered based on
memtable_cleanup_threshold
. When not set:If the deprecated settings are not present, the calculated default is 1/4 of the heap size.
See Tuning Java Virtual Memory for additional information!
Hi,
it is not quite clear from your questions, so I assume you refer to the settings memtable_heap_space_in_mb
and memtable_offheap_space_in_mb
in the cassandra.yaml ( I assume that you are referring to OSS C* 3.11).
The yaml has two settings for memtable sizes, on-heap and off-heap heap. They both default to 1/4 of the total heap size, and this default is probably a good starting point until you are certain how your workload behaves and want to consider more detailed tuning. If you want to make changes, proceed with small changes and monitor carefully, as allocating memory for memtables reduces the overall amount of memory that Cassandra can use.
Cassandra stores memtables either on the Java heap, off-heap (native) memory, or both. The memtable allocation is the total upper limit for memory that Cassandra can use for memtables. As per the yaml comments, Cassandra will stop accepting writes when the limit is exceeded until a flush completes. A flush is triggered based on the memtable_cleanup_threshold
.
By default, the memtable_allocation_type
is set to heap_buffers
, which allocates memtables on the heap using Java NIO. If necessary and to alleviate heap pressure, you can change the allocation type to off-heap. These are tuning changes and should be done within the context of your workload performance.
I hope this helps.
7 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use