With using Azul Zulu Prime Builds of OpenJDK for Cassandra you don't need to spend time in tuning the JVM Garbage Collection parameters.
Here a quick overview for switching from other JVMs to Azul Zulu Prime JVM on a Cassandra node:
The following documentation relies on Azul Zulu Prime JVM 19.07 or newer as since this version Azul Zulu Prime JVM does not need the ZST component any more which was required in earlier versions. If you deploy a new Cassandra installation make sure that only the Azul Zulu Prime JVM component (RPM/DEB package zing-jdk1.8.0) is installed and not the Azul Platform Prime ZST component (RPM/DEB package zing-zst). ZST is now only an optional tuning for Azul Platform Prime and new installations should start without it as a wrong configuration of ZST can reduce performance with Java applications using much native memory outside of the Java heap as Cassandra does.
First, after stopping the Cassandra service on the node, install Azul Zulu Prime JVM. The fastest way is to start on the Azul Zulu Prime JVM quick start page using the Azul Zulu Prime JVM package repository. Then change the JVM setting for Cassandra:
That's all. You don't need to change any other JVM parameter in the cassandra-env.sh configuration. Azul Zulu Prime JVM is ignoring non-Azul Zulu Prime JVM -XX parameters which you might have added before to tune other GC implementations.
After restarting the Cassandra node you can check with the following command if the switch to Azul Zulu Prime JVM was successful and the java command used is actually Azul Zulu Prime JVM and not a different JVM. An Azul Zulu Prime JVM java process returns "Zing 64-Bit Tiered VM" as version information.
jcmd JAVAPID VM.version
With JAVAPID the process ID of the java command as listed by just running "jcmd" without parameters.
For production systems, the following change is recommended:
- Disable the Cassandra GCInspector log messages as it might report long running GC phases which are of no concern when using Azul Zulu Prime JVM as those logged times are phases of the GC which are run in parallel to the application and don't pause the application when using Azul Zulu Prime JVM. The log messages written to the Cassandra system.log are of the following pattern:
INFO [Service Thread] DATE GCInspector.java:284 - GPGC New GC in 300ms. GenPauseless
To disable them, add the following line to cassandra_install_location/conf/logback.xml:
<logger name="org.apache.cassandra.service.GCInspector" level="ERROR"/>
For further questions about Azul Zulu Prime JVM configuration or system performance, please ask Azul Support.
Cassandra on Azul Zulu Prime JVM was never affected by the following JDK bug as a fix in Azul Zulu Prime JVM was already included in the Azul Zulu Prime JVM releases around the time this bug was triggered by a change added with JDK 8u161 / 8u162: https://issues.apache.org/jira/browse/CASSANDRA-14173