Database Reference
In-Depth Information
Enabling Java options for GC logging
JVM options provide a nice way to monitor Java applications. It is not specific to Cas-
sandra. One may set various -XX options as part of arguments when starting the Java ap-
plication. In Cassandra, these options can be enabled by uncommenting the lines with -XX .
The following is a list of the options:
# GC logging options -- uncomment to enable
# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDetails"
# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDateStamps"
# JVM_OPTS="$JVM_OPTS -XX:+PrintHeapAtGC"
# JVM_OPTS="$JVM_OPTS -XX:+PrintTenuringDistribution"
# JVM_OPTS="$JVM_OPTS -XX:+PrintGCApplicationStoppedTime"
# JVM_OPTS="$JVM_OPTS -XX:+PrintPromotionFailure"
# JVM_OPTS="$JVM_OPTS -XX:PrintFLSStatistics=1"
# JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date
+%s`.log"
# If you are using JDK 6u34 7u2 or later you can enable GC
log rotation
# don't stick the date in the log name if rotation is on.
# JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc.log"
# JVM_OPTS="$JVM_OPTS -XX:+UseGCLogFileRotation"
# JVM_OPTS="$JVM_OPTS -XX:NumberOfGCLogFiles=10"
# JVM_OPTS="$JVM_OPTS -XX:GCLogFileSize=10M"
It is pretty obvious what these options do. In case you want to enable some of these op-
tions, the following table shows what they mean:
Option
Description
Prints more details at garbage collection
-XX:+PrintGCDetails
Prints GC events with the date and time rather than with a timestamp that we get using -
XX:+PrintGCTimeStamps
-XX:+PrintGCDateStamps
-XX:+PrintHeapAtGC
Prints detailed GC information, including heap occupancy before and after GC
Search WWH ::




Custom Search