You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Vi...@ril.com on 2018/04/17 10:05:29 UTC

Memtable type and size allocation

Dear Community,

In Cassandra 3.11.2, there are 3 choices for the type of Memtable allocation and as per my understanding, if I want to keep Memtables on JVM heap I can use heap_buffers and if I want to store Memtables outside of JVM heap then I've got 2 options offheap_buffers and offheap_objects.

What exactly is the difference between the 2 choices given for off-heap allocation?

Also, the permitted memory space to be used for Memtables can be set at 2 places in the YAML file, i.e. memtable_heap_space_in_mb and memtable_offheap_space_in_mb.

Do I need to configure some space in both heap and offheap, irrespective of the Memtable allocation type or do I need to set only one of them based on my Memtable allocation type i.e. memtable_heap_space_in_mb when using heap buffers and memtable_offheap_space_in_mb only when using either of the other 2 offheap options?

https://stackoverflow.com/questions/49874917/memtable-type-and-size-allocation

Thanks and regards,
Vishal Sharma
"Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s). 
are confidential and may be privileged. If you are not the intended recipient. you are hereby notified that any 
review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is 
strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email. 
and delete this message and any attachments from your system.

Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. 
The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment."

Re: Memtable type and size allocation

Posted by kurt greaves <ku...@instaclustr.com>.
Hi Vishal,

In Cassandra 3.11.2, there are 3 choices for the type of Memtable
> allocation and as per my understanding, if I want to keep Memtables on JVM
> heap I can use heap_buffers and if I want to store Memtables outside of JVM
> heap then I've got 2 options offheap_buffers and offheap_objects.

Heap buffers == everything is allocated on heap, e.g the entire row and its
contents.
Offheap_buffers is partially on heap partially offheap. It moves the Cell
name + value to offheap buffers. Not sure how much this has changed in 3.x
Offheap_objects moves entire cells offheap and we only keep a reference to
them on heap.

Also, the permitted memory space to be used for Memtables can be set at 2
> places in the YAML file, i.e. memtable_heap_space_in_mb and
> memtable_offheap_space_in_mb.

 Do I need to configure some space in both heap and offheap, irrespective
> of the Memtable allocation type or do I need to set only one of them based
> on my Memtable allocation type i.e. memtable_heap_space_in_mb when using
> heap buffers and memtable_offheap_space_in_mb only when using either of the
> other 2 offheap options?


Both are still relevant and used if using offheap. If not using an offheap
option only memtable_heap_space_in_mb is relevant. For the most part, the
defaults (1/4 of heap size) should be sufficient.