cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert P Tobey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7486) Compare CMS and G1 pause times
Date Tue, 07 Apr 2015 23:24:14 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-7486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484318#comment-14484318
] 

Albert P Tobey commented on CASSANDRA-7486:
-------------------------------------------

So far my testing of read workloads matches my experience with writes. An 8GB heap with generic
G1GC settings is "good" for more workloads out of the box than haphazardly tuned CMS can be.
I've been testing on a mix of Oracle/OpenJDK and JDK7/8 and the results are fairly consistent
across the board with the exception that performance is a tad higher (~5%) on JDK8 than JDK7
(with G1GC - I have not tested CMS much on JDK8).

These parameters get better throughput than CMS out of the box with significantly improved
consistency in the max and p99.9 latency.

-Xmx8G -Xms8G -XX:+UseG1GC

If throughput is more critical than latency, the following will get a few % more throughput
at the cost of potentially higher max pause times:

-Xmx8G -Xms8G -XX:+UseG1GC -XX:MaxGCPauseMillis=2000 -XX:InitiatingHeapOccupancyPercent=75

My recommendation is to document the last two options in cassandra-env.sh but leave them disabled/commented
out for end-users to fiddle with. Other knobs for G1 didn't make a statistically measurable
difference in my observations.

G1 scales particularly well with heap size on huge machines. 8 to 16GB doesn't seem to make
a big difference, matching what [~rbranson] saw. At 24GB I started seeing about 8-10% throughput
increase with little variance in pause times.

IMO the simple G1 configuration should be the default for large heaps. It's simple and provides
consistent latency. Because it uses heuristics to determine the eden size and scanning schedule,
it will adapts well to diverse environments without tweaking. Heap sizes under 8GB should
continue to use CMS or even experiment with serial collectors (e.g. Raspberry Pi, t2.micro,
vagrant). If there is interest, I will write up a patch for cassandra-env.sh to make the auto-detection
code pick G1GC at >= 6GB heap and CMS for < 6GB.

> Compare CMS and G1 pause times
> ------------------------------
>
>                 Key: CASSANDRA-7486
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7486
>             Project: Cassandra
>          Issue Type: Test
>          Components: Config
>            Reporter: Jonathan Ellis
>            Assignee: Shawn Kumar
>             Fix For: 2.1.5
>
>
> See http://www.slideshare.net/MonicaBeckwith/garbage-first-garbage-collector-g1-7486gc-migration-to-expectations-and-advanced-tuning
and https://twitter.com/rbranson/status/482113561431265281
> May want to default 2.1 to G1.
> 2.1 is a different animal from 2.0 after moving most of memtables off heap.  Suspect
this will help G1 even more than CMS.  (NB this is off by default but needs to be part of
the test.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message