JEP 248: Make G1 the Default Garbage Collector

Doug Lea dl at
Fri Jul 31 10:39:08 UTC 2015

On 07/31/2015 02:17 AM, Kirk Pepperdine wrote:

>> As mentioned in other discussions, G1 might otherwise be a good choice in
>> some heavily concurrent programs. Before they put in that fence, I used to
>> see about an equal number of ups and downs vs other collectors in test
>> programs.
> We do know that TTS is ~ proportional thread counts…. do you have other
> scenarios/code that you can share?

I'm not sure what you are asking, but you can find as a non-exotic
example one of our parallel sort demos at

Here are some sample run times sorting 4 million boxed Longs
on three test machines.
Times are around a factor of two slower with G1 vs ParallelGC
on larger machines. (Numbers are eyeballed medians from those
listed - one of these days I should convert these to use jmh).
Last year (before that fence), this was one of the test programs
that tended to run faster with G1. (Someone in the GC group might
want to validate this by building a version without the fence.)

            8way   32way  64way(ht)
Par:      0.322  0.116  0.076
G1:       0.438  0.214  0.138


More information about the hotspot-dev mailing list