G1 is bad for me

Jon Masamitsu Jon.Masamitsu at Sun.COM
Fri Feb 19 07:53:45 PST 2010


Chi Ho Kwok wrote On 02/19/10 06:59,:

> Hi all,
>
> A large part of our CPU load is caused by GC, so I'm always interested
> in new techniques, but the last time I tried G1 (6u14?), the jvm
> rapidly crashed after startup under load. Is the recommendation to
> switch to/wait for JDK7 releases for G1, or is G1 on 6u18 (or later?)
> any good for production usage? I'd assume there will be more updates
> for JDK6 as JDK7 got extended to up to 10 milestones.


G1 is in 6u18 but it is still an experimental collector.  It's
definitely better
but if you try it add the flag -XX:-ReduceInitialCardMarks to work around
regression that escaped in 6u18.

>
> CMS with a 32G heap which changes rapidly (~10%/min replaced) is
> manageable, but we're "losing" 20% capacity because the threshold has
> to be so low, anything higher than 80% causes new gen promotions to
> fail during CMS and the app to stop for half a minute. Processing
> capacity is also reduced by half during a CMS run because the amount
> of threads has to be high (=6 at the moment) to make it hurry up, or
> it'll mean either setting the threshold even lower or risk promotion
> failures :(


If you're running into fragmentation, then either you start the CMS
cycles early (as it
appears you do) or use a larger heap (if you can).   There an RFE in jdk
7 (6631166)
that helps with fragmentation in some applications.   It's not in a jdk
6 yet.  If you're
a Java-4-business customer, contact your Sun/Oracle support person and
talk to
them about getting that RFE.

If your application is allocating objects at a high rate and CMS has to
do lots
of processing to keep up (might be the case if you're using 6 GC threads to
do the concurrent marking in parallel),  then the overhead may just be
what's
required to collect all that garbage.  Again, if you're a
Java-4-business customer,
talk to your support person to see if you can get some help in analyzing
your
situation.

>
> Chi Ho Kwok
>
> On Thu, Feb 18, 2010 at 6:37 PM, Y. Srinivas Ramakrishna
> <Y.S.Ramakrishna at sun.com <mailto:Y.S.Ramakrishna at sun.com>> wrote:
>
>     Hi Andrei -- please use the latest hs17 JVM which you can get from
>     JDK 7. There have been
>     many improvements (and bug fixes) since the 6u18/hs16 that you are
>     using below.
>     Most importantly, please add -XX:-ReduceInitialCardMarks to work
>     around a regression
>     introduced in 6u18/hs16, as described in the 6u18 release notes.
>     As re optimal settings (these may be quite different from shapes
>     that helped with CMS
>     for example), i'll let others w/more (tuning and other) experience
>     w/G1 comment.
>
>     -- ramki
>
>------------------------------------------------------------------------
>
>_______________________________________________
>hotspot-gc-use mailing list
>hotspot-gc-use at openjdk.java.net
>http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>  
>



More information about the hotspot-gc-use mailing list