Database Reference
In-Depth Information
3.
Next, install it by running the following:
make
make install
4.
After successfully installing
jemalloc
, we need to configure in-
stalled libraries for Cassandra in
cassandra-env.sh
:
export JEMALLOC_HOME= jemalloc/
export LD_LIBRARY_PATH=<JEMALLOC_HOME>/lib/
JVM_OPTS="$JVM_OPTS
-Djava.library.path=<JEMALLOC_HOME>/lib/"
Garbage Collection
Cassandra does explicit garbage collection, and server logs can be monitored for the
GCInspector
class for more information. You may opt to disable explicit garbage
collection using
XX:+DisableExplicitGC
, but it is advisable to do it only for ex-
perimental purposes. Alternatively configuring gcInterval settings are also an option
(
sun.rmi.dgc.server.gcInterval
and
sun.rmi.dgc.client.gcInterval
). It represents the maximum interval (in
ms) for Java runtime RMI (Remote Method Invocation) to call for garbage collection
of unused and soft references. By default it is set to 1 hour.
We can tune garbage collection settings in
cassandra-env.sh
available in the
$CASSANDRA_HOME/conf
folder. A few of the options are
# 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