cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viktor Jevdokimov <>
Subject RE: Tools for analize cassandra gc.log
Date Wed, 04 Jul 2012 14:02:18 GMT
All of written below is my personal experience, as goals I wanted to achieve.

We use these parameters in PROD for GC logs:
JVM_OPTS="$JVM_OPTS -XX:+PrintGCTimeStamps"
JVM_OPTS="$JVM_OPTS -XX:+PrintGCDetails"
JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log"

Log rotation works from Oracle Java 1.7.0_02:
JVM_OPTS="$JVM_OPTS -XX:+UseGCLogFileRotation"
JVM_OPTS="$JVM_OPTS -XX:NumberOfGCLogFiles=10"

Adding other parameters may generate log not readable by many/any analyzer.
Adding JVM_OPTS="$JVM_OPTS -XX:+PrintHeapAtGC" will not break analizers below, but useful
only to review manually.

1. GCHisto - to load different logs and compare some numbers
(pauses and number of GC's). Very useful for comparison.
2. GCViewer - shows memory consumption and pauses stats
and graphs.

3. PrintGCStats - text only, Linux only.
4. Garbagecat - a garbage, very little info, text only, while GCHisto & GCViewer much
more info and graphical.

Considering what to play with, understand Java GC first:

Most objects taking time in GC pause: Memtables, Caches; other objects dying fast - cleaned,
instead of copied/promoted. So play with memtable size also, cache invalidation.

GC frequency will grow when compaction is running, but not pauses (very short living objects).

Testing a lot of scenarios we found standard Cassandra GC settings are fine for most cases,
you may need to play with max heap and young heap size. Other than that you may play with:
-XX:SurvivorRatio=8 (4-16)

Not worth to play with:
-XX:MaxTenuringThreshold=1 (0 or more than 1 is not a good thing)

So mostly changing standard settings is a subject of achievement. Tuning GC is a last resort
to gain something.

Best regards / Pagarbiai

Viktor Jevdokimov
Senior Developer

Phone: +370 5 212 3063
Fax: +370 5 261 0453

J. Jasinskio 16C,
LT-01112 Vilnius,

Disclaimer: The information contained in this message and attachments is intended solely for
the attention and use of the named addressee and may be confidential. If you are not the intended
recipient, you are reminded that the information remains the property of the sender. You must
not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this
message in error, please contact the sender immediately and irrevocably delete this message
and any copies.> -----Original Message-----
> From: ruslan usifov []
> Sent: Wednesday, July 04, 2012 14:08
> To:
> Subject: Tools for analize cassandra gc.log
> Hello
> Please dear community share some tools for gc.log analize. I found
>, but it doesn't
> work

View raw message