简体   繁体   中英

Which memory does Cassandra use for Row Cache?

Does it use the heap memory or the remaining server memory?

I have a server with 32 GB of RAM, I initialised Cassandra with a 25 GB MAX_HEAP_SIZE and I specified a Row Cache capacity of 20 GB.

Am I correctly assuming Row Cache uses the heap memory I initialised the process with? Or is my configuration expecting the server to have at least 45 GB of ram?

This row key documentation states that there are 2 actual row_cache_provider implementations:

SerializingCacheProvider: Serializes the contents of the row and stores it in native memory, that is, off the JVM Heap

and

ConcurrentLinkedHashCacheProvider: Rows are cached using the JVM heap , providing the same row cache behavior as Cassandra versions prior to 0.8.

The default is SerializingCacheProvider so if you don't change it, row cache does not use the JVM Heap memory.

Looking at the source, the row cache is an ICache , which is put onto the heap as per its being an object without special treatment.

You may perform further tests to ascertain the true performance and memory handling.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM