G1 Performance [Was: JEP 248: Make G1 the Default Garbage Collector]

Doug Lea dl at cs.oswego.edu
Wed Jul 29 17:55:45 UTC 2015

On 07/29/2015 12:09 PM, Andrew Haley wrote:
> I am concerned that G1 does not perform well with some important
> workloads.  In particular, on heavily-loaded systems some
> multi-threaded programs which generate a lot of garbage run
> significantly more slowly with G1.  I've been measuring the
> performance loss and it's about 20-30%, depending on the application.

The problem is that there is a full memory fence when issuing
cross-region GC write barriers. Most concurrent producer-consumer
designs hit this case frequently, and can run almost arbitrarily
slower, down to the rate of issuing fences (MFENCE/DMB/etc).
I know that Erik Osterlund (and possibly others) are looking into ways
of removing this fence. I sure hope they succeed before jdk9 ships!


More information about the hotspot-dev mailing list