G1 is bad for me

Andrei Pozolotin andrei.pozolotin at gmail.com
Fri Feb 19 07:50:18 PST 2010


these are G1 settings and log sample, for same reference load

++++++++++++++++++++++++++++++++++++++++++++++++

# use server-style JIT compiler
wrapper.java.additional.100=-server

# do GC logging
wrapper.java.additional.110=-verbose:gc
wrapper.java.additional.111=-Xloggc:./logs/gc.log
wrapper.java.additional.112=-XX:+PrintGCDetails
wrapper.java.additional.113=-XX:+PrintGCTimeStamps

# Heap Total = PermGen + NewGen + OldGen;
wrapper.java.additional.120=-Xms3700m
wrapper.java.additional.121=-Xmx3700m

# PermGen;
wrapper.java.additional.130=-XX:PermSize=50m
wrapper.java.additional.131=-XX:MaxPermSize=50m

# NewGen; Parallel collector;
wrapper.java.additional.150=-XX:+UnlockExperimentalVMOptions
wrapper.java.additional.151=-XX:+UseG1GC
wrapper.java.additional.152=-XX:-ReduceInitialCardMarks
wrapper.java.additional.156=-XX:+G1ParallelRSetUpdatingEnabled
wrapper.java.additional.157=-XX:+G1ParallelRSetScanningEnabled
wrapper.java.additional.159=-XX:MaxGCPauseMillis=70
wrapper.java.additional.160=-XX:GCPauseIntervalMillis=700

++++++++++++++++++++++++++++++++++++++++++++++++

614.106: [GC pause (young), 0.32634900 secs]
   [Parallel Time: 323.5 ms]
      [Update RS (Start) (ms):  614110.5  614110.8  614111.4  614110.5]
      [Update RS (ms):  8.0  7.7  7.2  8.2
       Avg:   7.8, Min:   7.2, Max:   8.2]
         [Processed Buffers : 4 8 6 4
          Sum: 22, Avg: 5, Min: 4, Max: 8]
      [Ext Root Scanning (ms):  3.7  4.0  4.2  3.7
       Avg:   3.9, Min:   3.7, Max:   4.2]
      [Mark Stack Scanning (ms):  0.0  0.0  0.0  0.0
       Avg:   0.0, Min:   0.0, Max:   0.0]
      [Scan-Only Scanning (ms):  0.0  0.0  0.0  0.0
       Avg:   0.0, Min:   0.0, Max:   0.0]
         [Scan-Only Regions : 0 0 0 0
          Sum: 0, Avg: 0, Min: 0, Max: 0]
      [Scan RS (ms):  301.0  301.3  300.7  300.9
       Avg: 301.0, Min: 300.7, Max: 301.3]
      [Object Copy (ms):  10.2  9.9  10.8  10.0
       Avg:  10.2, Min:   9.9, Max:  10.8]
      [Termination (ms):  0.0  0.0  0.0  0.0
       Avg:   0.0, Min:   0.0, Max:   0.0]
      [Other:   0.6 ms]
   [Clear CT:   0.9 ms]
   [Other:   2.0 ms]
   [ 823M->742M(3700M)]
 [Times: user=1.23 sys=0.01, real=0.33 secs]

++++++++++++++++++++++++++++++++++++++++++++++++


-------- Original Message  --------
Subject: Re: G1 is bad for me
From: Chi Ho Kwok <chkwok at digibites.nl>
To: hotspot-gc-use <hotspot-gc-use at openjdk.java.net>
Date: Fri 19 Feb 2010 08:59:53 AM CST
> 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.
>
> 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 :(
>
> 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
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20100219/22e46e4e/attachment-0001.html 


More information about the hotspot-gc-use mailing list