G1gc compaction algorithm

Thomas Schatzl thomas.schatzl at oracle.com
Thu Jul 24 07:18:22 UTC 2014


Hi,

On Thu, 2014-07-24 at 08:57 +0300, Martin Makundi wrote:
>         
>         I took a look at your 2nd gc log.

[...]


>         Considering the heap usage after full gc is 17g,
>         -XX:G1HeapWastePercent=0 is not appropriate.  This should be
>         ~50.
>         The reason you run into full gc, is a lot of humongous
>         allocation happened at that time, while the heap used is ~21g.
>         
>         There are other tunings we can try, but I think those 2 should
>         give better results. 


> XX:G1HeapWastePercent=0  seems to work, however.

Simply fragmentation. There is no good workaround to Full GCs at this
time except hoping that it works out.
>         
>         Comments to your questions inlined.
>         Thanks,
>         Jenny
>         On 7/23/2014 8:01 AM, Martin Makundi wrote:
>         
>         > 1. Log says "recent GC overhead higher than threshold after
>         > GC, recent GC overhead: 13.94 %, threshold: 10.00 %" what is
>         > that 10% threshold how can it be changed and what will it
>         > affect?
>         G1 uses this to decide when to expand the heap.  It means when
>         the gc pause time is over 10% of the application time, then we
>         need to expand the heap. 
> 
> Is this adjustable, I did not notice any parameters affecting this 10%
> threshold?

GC overhead = 100.0 * (1.0 / (1.0 + GCTimeRatio))

This somewhat complicated formula is due to backwards compatibility.

Thomas





More information about the hotspot-gc-use mailing list