Changing the Garbage-First MaxGCPauseMillis parameter
Set the peak pause time for the Garbage-First (G1) garbage collector located in jvm8-server.options or jvm11-server.options depending upon the JDK.
jvm-server.options
There are three files that control Java Virtual Machine options:- jvm-server.options: options independent of any particular JVM
- jvm8-server.options: options particular to JVM 8
- jvm11-server.options: options particular to JVM 11
Package installations | /etc/dse/cassandra/jvm [8 | 11] -server.options |
Tarball installations | installation_location/resources/cassandra/conf/jvm [8 | 11] -server.options |
A pause occurs when a region of memory is full and the JVM needs to make space to continue. A region can fill up, if the rate data is stored in memory exceeds the rate at which it is removed. When tuning the JVM, try to minimize garbage collection pause, also known as a stop-the-world event. For more details, see Garbage collection pauses.
During a pause, all operations are suspended. Because a pause affects networking, the node can appear as down to other nodes in the cluster. SELECT and INSERT statements wait, which increases read and write latencies. Avoid pauses longer than a second, or multiple pauses within a second.
MaxGCPauseMillis
sets the peak pause time expected in the
environment. By default, DataStax Enterprise (DSE) sets the maximum to 500
milliseconds (-XX:MaxGCPauseMillis=500
). DataStax recommends
staying between 500-2000 ms. Set the maximum value to the expected peak pause length
(not the target pause length). When adjusting the GC pause, there is always a
tradeoff between latency and throughput: - Longer pause increases latency and throughput
- Shorter pause decreases latency and throughput
Set the value for the -XX:MaxGCPauseMillis
parameter in the
jvm-server.options file.