AW: Re: ParNew pauses longer in JDK7
Andreas Müller
Andreas.Mueller at mgm-tp.com
Wed Jan 8 06:05:50 PST 2014
Hi Shane,
your problem is documented in the purple lines of the attached plot:
New gen pauses get LONGER when new gen size gets smaller for the CMS collector only.
As you can see from figure 3 of my blog post this translates into much more accumulated pause time because new gen pauses also get MORE FREQUENT when new gen size gets smaller.
The fast growth of accumulated pause time directly translates into a sharp decrease of GC throughput (figure 2) as is explained (even with a formula) in the text.
Remeasuring those purple lines with Java 6 would probably show that this is a Java 7 problem.
So far I have only measured one point (at NewSize=160 MB) in comparison to the solid purple line which confirmed what you observed with your benchmark.
As there is a link to the source code of my benchmark in the article anybody can use it to reproduce the difference in Java 6 and 7.
Best regards
Andreas
Von: Andreas Müller
Gesendet: Mittwoch, 8. Januar 2014 14:53
An: 'Shane.Cox at theice.com'
Cc: hotspot-gc-use at openjdk.java.net
Betreff: Re: ParNew pauses longer in JDK7
Hi Shane,
>While benchmarking my application on JDK7, I noticed that minor GC pauses are longer compared to JDK6. One clue may relate to heap size. I noticed that heap size (Xmx) has much more impact on minor GC in JDK7. This is what I have observed:
>JDK6 w/ 1GB heap: avg minor GC pause = 3.9ms
>JDK6 w/ 10GB heap: avg minor GC pause = 3.9ms
>JDK7 w/ 1GB heap: avg minor GC pause = 5ms
>JDK7 w/ 10GB heap: avg minor GC pause = 13.3ms
Very interesting: Only your comparison with Java 6 made clear to me that this is a bug in Java7!
You can probably work around that problem and make Java 7 perform better by explicitly setting the NewSize to a much higher value than the default of around 160 MB which I see in all the GC logs.
I have observed before that the CMS collector does not perform well for small (and default) NewSize. Find the details here:
http://blog.mgm-tp.com/2013/12/benchmarking-g1-and-other-java-7-garbage-collectors/
in the section about the GarbageOnly benchmark and, in particular, figures 2+3.
I have further observed that the increase in accumulated pause time (shown in figure 3) for smaller values of NewSize comes about because ParNew pauses get LONGER when NewSize gets SMALLER (which is odd enough).
I have a figure showing that but removed it from my blog post because it is (too) long already. I will send it to you in an extra mail, though.
It did, however, not occur to me to check that rather odd behavior with older Java versions (as you did with Java 6).
Thanks for asking your question!
You helped me to understand that there is another bug which I unknowingly documented on my blog post.
The first one is already highlighted in figure 11 of the same article and was also discussed on this mailing list some weeks ago.
Mit freundlichen Grüßen/Best regards
Andreas Müller
mgm technology partners GmbH
Frankfurter Ring 105a
80807 München
Tel. +49 (89) 35 86 80-633
Fax +49 (89) 35 86 80-288
E-Mail Andreas.Mueller at mgm-tp.com<mailto:Andreas.Mueller at mgm-tp.com>
Innovation Implemented.
Sitz der Gesellschaft: München
Geschäftsführer: Hamarz Mehmanesh
Handelsregister: AG München HRB 105068
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20140108/a40d3fd5/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NewGenPauseDuration.png
Type: image/png
Size: 61103 bytes
Desc: NewGenPauseDuration.png
Url : http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20140108/a40d3fd5/NewGenPauseDuration-0001.png
More information about the hotspot-gc-use
mailing list