G1 eden resizing behaviour ?

Thomas Schatzl thomas.schatzl at oracle.com
Tue Dec 9 14:06:50 UTC 2014


Hi,

On Tue, 2014-12-09 at 14:58 +0100, Simone Bordet wrote:
> Hi,
> 
> On Tue, Dec 9, 2014 at 2:43 PM, Thomas Schatzl
> <thomas.schatzl at oracle.com> wrote:
> >   sounds like JDK-8035557.
> 
> Thanks for the fast response !
> 
> With respect to https://bugs.openjdk.java.net/browse/JDK-8035557 I
> observe that the Eden shrinks in the young GC *before* the mixed GCs.
> Is that just an alternate behaviour of the same bug ?

This may be because the heap is already very full (around
100-G1ReservePercent) so it cuts down on the young gen size.

G1 tries to keep G1ReservePercent of heap empty to avoid evacuation
failure.

Another reason could be that G1 thinks that the pauses caused by marking
cut too much into the available time budget (depending on your
settings), so it decreases the heap.

> I remember a while back G1 performing mixed GC after the end of marking.
> More recently, it always perform a young GC after the end of marking,
> before starting the mixed GCs.
> Was this young GC added exactly to cope with mispredictions due to
> evacuations of old regions ?

  that is JDK-8057781. I do not think it has ever been different though,
but I may be wrong.

Thomas




More information about the hotspot-gc-use mailing list