G1gc compaction algorithm
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jul 24 07:27:45 UTC 2014
Hi,
On Thu, 2014-07-24 at 10:22 +0300, Martin Makundi wrote:
>
>
> >
> > 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.
>
>
> Is this something that I can tune also for g1gc, e.g., example, with
> -XX:GCTimeRatio=9 default?
>
>
> What will it affect and how does it relate to MaxGCPauseMillis, or are
> they related at all to each other?
Sorry, I saw the other question too late, sorry. :/
Yes, GCTimeRatio can be used with g1 too. It only seems to be used to
determine whether the heap should be expanded at GC or not. I.e. if the
current gc overhead is smaller than that value, it does not, otherwise
it does.
If you did set -Xms == -Xmx increasing this does not have any particular
effect.
Thomas
More information about the hotspot-gc-use
mailing list