Tune Java Virtual Machine
Improve performance or reduce high memory consumption by tuning the Java Virtual Machine (JVM). Operations on the following components occur in the JVM heap:
-
Bloom filters
-
Partition summary
-
Partition key cache
-
Compression offsets
-
SSTable index summary
The metadata resides in memory and is proportional to total data. Some of the components grow proportionally to the size of total memory. The database gathers replicas for a read or for anti-entropy repair and compares the replicas in heap memory.
Data written to the database is first stored in memtables in heap memory. Memtables are then flushed to SSTables on disk.
The database uses off-heap memory as follows: |
-
Page cache. The database uses additional memory as page cache when reading files on disk.
-
The Bloom filter and compression offset maps reside off-heap.
-
The database can store cached rows in native memory, outside the Java heap. This reduces JVM heap requirements, which helps keep the heap size in the sweet spot for JVM garbage collection performance.