<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, 10 Dec 2018 at 16:48, Thomas Schatzl <<a href="mailto:thomas.schatzl@oracle.com">thomas.schatzl@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
see inline.<br>
<br>
On Mon, 2018-12-10 at 16:22 +0100, Ruslan Synytsky wrote:<br>
> Dear Thomas and Sangheon, hope you are doing great. <br>
> <br>
> I just noticed an important improvement related to vertical scaling<br>
> and would like to clarify details mentioned in the release notes <br>
> <br>
> > By default, G1 may now give back Java heap memory to the operating<br>
> > system during any concurrent mark cycle. G1 will respect default <br>
> > Java heap sizing policies at that time. <br>
><br>
> Does it mean that G1 is smart enough now by default and users do not<br>
> need to deal with loadaverage and G1PeriodicGCInterval that we<br>
> introduced in JEP 346? <br>
<br>
If there is enough activity to trigger marking cycles, G1 will give<br>
back memory according to default heap sizing rules, i.e. current heap<br>
occupancy, MinHeapFreeRatio, MaxHeapFreeRatio and of course the value<br>
of Xms.<br>
<br>
JEP 346 is about triggering and detecting a marking cycle (or continue<br>
cleaning up the old gen, or a full gc as option) if there is no<br>
activity.<br>
<br>
So the JEP 346 controls are still required if you want G1 to give back<br>
memory on idle (to define what is "idle").<br>
<br>
Note that during review we changed the idle detection off by default -<br>
that does not impact the functionality giving back memory to the OS<br>
during a marking cycle.<br></blockquote><div>Ok, more clear now.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> > This behavior may be disabled by changing minimum Java heap size <br>
> > via the -Xms option.<br>
> At the same time if a user adjusts Xms option then he/she does not<br>
> get this "smart behaviour" at all.<br>
> <br>
<br>
This sentence should indicate that you can disable giving back memory<br>
to the OS by modifying the Xms value. In particular, setting the Xms to<br>
the Xmx value - which is a rule that is part of the default heap sizing<br>
policy.<br></blockquote><div>Then I think the wording in the release notes is confusing as there is only one case when changing Xms disables giving memory back, specifically when Xms = Xmx. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Are these rephrased statements correct?<br>
<br>
Almost :) Corrections above.<br>
<br>
Note that the implementation of JEP 346 has been pushed today, so it<br>
will be JDK12 no matter what - there is only some post-push JEP work to<br>
do.<br></blockquote><div>It's great! I will run some tests on my side later this week. </div><div> </div><div>Thanks</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks,<br>
Thomas<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:"Times New Roman""><span style="font-family:Calibri,sans-serif;font-size:15px">Ruslan</span><br style="font-family:Calibri,sans-serif;font-size:15px"><span style="font-family:Calibri,sans-serif;font-size:15px">CEO @ </span><span style="font-family:Calibri,sans-serif;font-size:15px"><a href="https://jelastic.com/" style="color:rgb(17,85,204)" target="_blank">Jelastic</a></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>