Set the heap size for Java garbage collection
The default JVM garbage collection (GC)is G1 for DSE 5.1 and later.
DataStax does not recommend using G1 when using Java 7. This is due to a problem with class unloading in G1. In Java 7, PermGen fills up indefinitely until a full GC is performed. |
Heap size is usually between ¼ and ½ of system memory. Do not devote all memory to heap because it is also used for offheap cache and file system cache.
See Tuning Java Virtual Machine for more information on tuning the Java Virtual Machine (JVM).
If you want to use Concurrent-Mark-Sweep (CMS) garbage collection, contact the DataStax Services team for configuration help. Tuning Java resources provides details on circumstances where CMS is recommended, though using CMS requires time, expertise, and repeated testing to achieve optimal results. |
The easiest way to determine the optimum heap size for your environment is:
-
Set the
MAX_HEAP_SIZE
in thejvm-server.options
file to a high arbitrary value on a single node. -
View the heap used by that node:
-
Enable GC logging and check the logs to see trends.
-
Use List view in OpsCenter.
-
-
Use the value for setting the heap size in the cluster.
This method decreases performance for the test node, but generally does not significantly reduce cluster performance. |
If you don’t see improved performance, contact the DataStax Services team for additional help in tuning the JVM.