Database Reference
In-Depth Information
JVM_OPTS="$JVM_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
JVM_OPTS="$JVM_OPTS -XX:+UseTLAB"
Cassandra, by default, uses concurrent mark and sweep garbage collector ( CMS GC ).
It performs garbage collection concurrently with the execution of Cassandra and pauses
for a very short while. This is a good candidate for high-performance applications such as
Cassandra. With the concurrent collector, a parallel version of the young generation copy-
ing collector is used. Thus, we have UseParNewGC , which is a parallel copy collector
that copies surviving objects in young generation from Eden to Survivor spaces and from
there to old generation. It is written to work with concurrent collectors such as CMS GC.
Further, CMSParallelRemarkEnabled reduces the pauses during the remark phase.
The other garbage settings do not impact garbage collection significantly. However, low
values for CMSInitiatingOccupancyFraction may lead to frequent garbage col-
lection because concurrent collection starts if the occupancy of the tenured generation
grows above the initial occupancy. The CMSInitiatingOccupancyFraction op-
tion sets the percentage of current tenured generation size.
If you decide to debug the garbage collection, it is a good idea to use tools such as JCon-
sole, in order to look into how frequent garbage collection takes place, CPU usage, and so
on. You may also want to uncomment the GC logging options in cassandra-env.sh
to see what's going on beneath the Cassandra process.
Note
If you decide to increase the Java heap size over 6 GB, it may be interesting to switch the
garbage collection settings too. Garbage First Garbage Collector ( G1 GC ) is shipped
with Oracle Java 7 update 4+. It is claimed to work reliably on larger heap sizes and it's
claimed that applications currently running on CMS GC will be benefited by G1 GC in
more ways than one. (Read more about G1 GC on http://www.oracle.com/technetwork/
java/javase/tech/g1-intro-jsp-135488.html . )
Other JVM options
The other JVM options are as follows:
Compressed Ordinary Object Pointers : In the 64-bit JVM, ordinary object
pointers ( OOPs ) normally have the same size as machine pointer, and that is 64
bit. This causes larger heap size requirement on a 64-bit machine for the same ap-
Search WWH ::




Custom Search