When will G1 shrink the heap?
Paul Richards
paul.richards at gmail.com
Tue Apr 12 18:54:52 UTC 2016
My understanding is that under normal circumstances G1 should only perform
young and mixed GC cycles. A full GC should be a rare occurrence from what
I read.
Combined with the information you've kindly provided, does this mean that
G1 will practically never shrink the heap if the system is running
healthily?
Thanks,
On Tue, 12 Apr 2016 19:03 Yu Zhang, <yu.zhang at oracle.com> wrote:
> Paul,
>
> I checked both jdk8 and current jdk9. The heap is only shrinked after full
> gc.
> After full gc, there is a way to calculate maximum_desired_capacity (based
> on used heap after full gc and historic data). If the committed heap is
> bigger than the maximum_desired_capacity, then the heap shrinks.
>
> If you -XX:+PrintAdaptiveSizePolicy, you should see messages in the gc log
> when shrinking happens.
> "Attempt heap shrinking..."
>
> Thanks,
> Jenny
>
> On 4/11/2016 11:24 AM, Paul Richards wrote:
>
> I try to track the latest stable release from Oracle. Currently we're
> using Java SE 8u77.
>
> I will likely migrate to Java 9 when it is officially released, so it
> would be interesting to know if your answer is different for Java 9.
>
> On 11 April 2016 at 18:20, Yu Zhang <yu.zhang at oracle.com> <yu.zhang at oracle.com> wrote:
>
> Paul,
>
> Which jdk version are you using?
>
> Thanks,
> Jenny
>
> On 4/6/2016 6:13 AM, Paul Richards wrote:
>
> Hi there,
> Under what circumstances will G1 decide to shrink the heap? I'm
> hoping someone can point me to existing docs for this.
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20160412/1aafd58b/attachment.html>
More information about the hotspot-gc-use
mailing list