With using Zing for Cassandra you don't need to spend time in tuning the JVM. Only some standard settings on the Operating System level have to be made, most of them are default anyway for every Zing installation.
First, our recommended standard Zing Linux system settings should be taken care of. They are documented here: Zing User Guide - Installation Prerequisites Details
Second, for Cassandra on Zing, the following additional settings are recommended:
- Increase the RAM available for the file system cache as common Cassandra usage patterns require high I/O intensity. By default, Zing reserves 85% (75% fund + 5% contingency + 5% pause prevention) of the the system RAM for Java.
For Cassandra on Zing, this should be reduced to 50% + 5% + 5%.
To change it, use the command system-config-zing-memory, say "no" to "accept default" and accept all other default values except for changing the "total memory to dedicate to Zing" from 75 to 50 %. Alternatively, instead of using the system-config-zing-memory command, change the parameter fundmemory in file /etc/zing/pmem.conf from 75 to 50 and restart the zing-memory system service.
- As the memory available for Zing was reduced, you have to modify the -Xmx JVM parameter as well. The possible maximum value possible is shown by the command zing-ps -s as column Reservable.
If zing-ps shows for instance 34500 as Reservable, use -Xmx34500M.
- add or change in /etc/sysctl.conf or /etc/sysctl.d/zing.conf the following file system cache settings:
Those are standard Linux recommendations generally for databases to prevent spikes and waits in I/O.
- Disable the Cassandra GCInspector log messages as it might report long running GC phases which are of no concern when using Zing as those logged times are phases of the GC which are run in parallel to the application and don't pause the application. 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"/>
In general, Zing runs better and faster with more RAM and more CPU cores as it offers more headroom to buffer application allocation spikes and allows more CPU resources to run the concurrent GC in parallel on many cores. With Zing, in contrast to many other JVMs, you don't experience a slow down or increased application pauses when adding RAM and increasing the Java heap.
For further questions about Zing configuration or system performance, please ask our Azul Support.
In addition, you can request our Azul Cassandra Healthcheck performed by one of our Field Engineers, for instance if you plan a large Cassandra deployment.