I have some questions about cassandra memtable. I'll be grateful for the help.
Facts about memtable:
1) placed in RAM;
2) per-ColumnFamily structure;
3) multiple memtables may exist for a single column family;
Questions:
1) When additional memtable for column family are created? What condition is need? I assume that additional memtables are created after creation additional commit log file. This is true?
2) What occurs after reaching commit log size threshold? I assume that will start placing memtables to queue; after queue filling will start flushing memtable to sstable and after this the older commit log (on hdd) and corresponding memtables (in ram) are removed. In this case some part of memtable memory will be alway empty and commit log always will be filled up to 90-100%?
3) What occurs when the memtable size threshold is reached? Like previous case will start flushing to sstable? Some part of commit log also will be always empty and memtable memory will be filled up to 90-100%?
4) About memtable_allocation_type: in official recources - "offheap_buffers moves the cell name and value to DirectBuffer objects. This has the lowest impact on reads — the values are still “live” Java buffers — but only reduces heap significantly when you are storing large strings or blobs.". What does DirectBuffer mean? It is placed in java heap? Can you give links to websites with information about it?
thank you very much!
I advise you to watch https://academy.datastax.com/courses/learning-cassandra-write-path
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With