<div><div dir="auto">Dear Kirk, thank you for the feedback. Please see inline.</div><br><div class="gmail_quote"><div dir="auto">On Mon, May 21, 2018 at 07:45 Kirk Pepperdine <<a href="mailto:kirk@kodewerk.com">kirk@kodewerk.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Rodrigo,<div><br></div><div>Interesting idea. IMHO, this solution is too simplistic as it focuses on the needs of providers at the detriment of the goals of the consumers.</div></div></blockquote><div dir="auto">I’m very concerned on this statement. Which part of the patch description gives you the feeling that this work has been done in favor of providers? Believe me, based on my experience of working with hosting providers worldwide, cloud vendors are least interested in resource usage optimization, because more resources customers use more money they pay. So, please give us a hint how the description can be improved.<br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Full collections in normal G1 work loads tend to be very pause expensive and one of the goals when tuning the garbage collector is to make sure you never see all Full collection. I would suggest that a better, but more complex system would be work with some how making adjustments to how regions are selected for evacuation. Some how favoring those regions whose memory maybe returned to the OS.</div><div><br></div><div>That said, it is my current opinion that ZGC or Shenadoha will replace G1 given that they promise better pause time characteristics. Once these collector do become more popular you will end up with the same situation. Again, triggering a full collection to solve your problem may not be in the best interest of applications owners.</div></div></blockquote><div dir="auto">We tested Shenandoah and it looks very promising and is a good candidate for the default GC. A high level overview can be found at the link <a href="https://dzone.com/articles/choosing-the-right-gc">https://dzone.com/articles/choosing-the-right-gc</a></div><div dir="auto"><br></div><div dir="auto">However, as I understand Shenandoah and ZGC are still in active development phase, so end users can’t fully rely on them yet. At the same time, I personally do not see any problem for incremental improvements of existing technologies. For example, some related improvements for CMS were incorporated in the past -XX:-ShrinkHeapInSteps <a href="https://bugs.openjdk.java.net/browse/JDK-8146436">https://bugs.openjdk.java.net/browse/JDK-8146436</a>. </div><div dir="auto"><br></div><div dir="auto">While high performance is one of the main advantages of JVM, the real world is much more diverse. Huge number of running JVMs are in idle mode or underutilize the allocated resources. In any case, we do not suggest to replace one solution by another one, both (high performance and high efficiency) can coexist. It should be optional and enabled upon end user decision.</div><div dir="auto"><br></div><div dir="auto">Regards </div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div><br></div><div>Kind regards,</div><div>Kirk Pepperdine</div></div><div style="word-wrap:break-word"><div><br><div><blockquote type="cite"><div>On May 20, 2018, at 3:01 AM, Rodrigo Bruno <<a href="mailto:rbruno@gsd.inesc-id.pt" target="_blank">rbruno@gsd.inesc-id.pt</a>> wrote:</div><br class="m_6038632066700076450Apple-interchange-newline"><div><div><div>Dear OpenJDK community,</div><div><br></div><div><a href="https://jelastic.com/" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">Jelastic</a><span style="font-size:12.8px"> and </span><a href="http://www.inesc-id.pt/" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">INESC-ID</a><span style="font-size:12.8px"> have developed a patch for OpenJDK that improves elasticity of JVM with variable loads. The detailed description of the patch can be found below</span><span style="font-size:12.8px">. </span>We would like share this patch with the community and push it to the mainstream. <span style="font-size:12.8px">We believe this work will help Java community to make JVM even better and improve the memory resources usage (save money) in the modern cloud environments. A more complete patch description can be found in the<span> </span><a href="http://www.gsd.inesc-id.pt/~rbruno/publications/rbruno-ismm18.pdf" style="color:rgb(17,85,204)" target="_blank">paper</a><span> </span>that will be presented in ISMM 2018.</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span id="m_6038632066700076450gmail-m_4829585517147182841gmail-docs-internal-guid-5baadcad-74bf-b29f-1343-ae592e6f973c"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:center"><span style="font-size:18pt;background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Elastic JVM Patch Description</font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Elasticity is the key feature of the cloud computing. It enables to scale resources according to application workloads timely. Now we live in the container era. Containers can be scaled vertically on the fly without downtime. This provides much better elasticity and density compared to VMs. However, JVM-based applications are not fully container-ready. The first issue is that HotSpot JVM doesn’t release unused committed Heap memory automatically, and, therefore, JVM can’t scale down without an explicit call of the full GC. Secondly, it is not possible to increase the size of JVM Heap in runtime. If your production application has an unpredictable traffic spike, the only one way to increase the Heap size is to restart the JVM with a new Xmx parameter. </font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">To solve these 2 major issues and make JVM more container friendly, we have implemented the following improvements: i) timely reduce the amount of unused committed memory; and ii) dynamically limit how large the used and committed memory can grow. The patch is implemented for the Garbage First collector.</font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14pt;background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Timely Reducing Unused Committed Memory</font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">To accomplish this goal, the HotSpot JVM was modified to periodically trigger a full collection. Two full collections should not be separated by more than </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">GCFrequency</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> seconds, a dynamically user-defined variable. The </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">GCFrequency</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> value is ignored and therefore, i.e., no full collection is triggered, if:</span></font></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><ul style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;margin-top:0pt;margin-bottom:0pt"><li style="margin-left:15px;list-style-type:disc;font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><div style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">GCFrequency</span><span style="font-size:12pt;background-color:transparent;font-style:normal;vertical-align:baseline;white-space:pre-wrap"> is zero or below;</span></font></div></li><li style="margin-left:15px;list-style-type:disc;font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><div style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">the average load on the host system is above </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxLoadGC. </span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">The </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxLoadGC</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is a dynamically user-defined variable. This check is ignored if </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxLoadGC</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is zero or below;</span></font></div></li><li style="margin-left:15px;list-style-type:disc;font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><div style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">the committed memory is above </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MinCommitted </span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">bytes. </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MinCommitted</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is a dynamically user-defined variable. This check is ignored if </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MinCommitted</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is zero or below;</span></font></div></li><li style="margin-left:15px;list-style-type:disc;font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><div style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">the difference between the current heap capacity and the current heap usage is below </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxOverCommitted</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> bytes. The </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxOverCommitted</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is a dynamically user-defined variable. This check is ignored if </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxOverCommitted</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> is zero or below;</span></font></div></li></ul><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">The previously mentioned concepts are illustrated in the figure below:</font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br><br><br><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><img src="https://lh4.googleusercontent.com/Id-cgB7_NWyw0BcoE2vKL-PBEo0QPU_f7SsIiMlhNllE--0mBuNmqLhbq162RT3h2GmBY2UaSv9arTT6G7EuGu0sqZhxAmZ3F2jncUCH2yl6i4P06TDmsL5pbABLYmxohMrpt1dl" width="646" height="415" class="m_6038632066700076450gmail-a6T m_6038632066700076450gmail-CToWUd" style="outline:0px;border:none"></font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">The figure above depicts an application execution example where all the aforementioned variables come into play. The default value for all introduced variables (</span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">GCFrequency, MaxLoadGC, MaxOverCommitted, </span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">and, </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MinCommitted</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">) is zero. In other words, by default, there are no periodic GCs.</span></font></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">With this these modifications, it is possible to periodically eliminate unused committed memory in HotSpot. This is very important for applications that do not trigger collections very frequently and that might hold high amounts of unused committed memory. One example are web servers, whose caches can timeout after some minutes and whose memory might be underutilized (after the caches timeout) at night when the amount of requests is very low.</font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14pt;background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">-Xmx Dynamic Limit Update </font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">To dynamically limit how large the committed memory (i.e. the heap size) can grow, a new dynamically user-defined variable was introduced: </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">CurrentMaxHeapSize</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">. This variable (defined in bytes) limits how large the heap can be expanded. It can be set at launch time and changed at runtime. Regardless of when it is defined, it must always have a value equal or below to </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxHeapSize</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> (Xmx - the launch time option that limits how large the heap can grow). Unlike </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">MaxHeapSize</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">, </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">CurrentMaxHeapSize</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">, can be dynamically changed at runtime.</span></font></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">For example dynamically set 1GB as the new Xmx limit</font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">jinfo -flag CurrentMaxHeapSize=1g <java_pid></font></span></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Setting </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">CurrentMaxHeapSize</span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> at runtime will trigger a full collection if the desired value is below the current heap size. After finishing the full collection, a second test is done to verify if the desired value is still above the heap size (note that a full collection will try to shrink the heap as much as possible). If the value is still below the current heap size, then an error is reported to the user. Otherwise, the operation is successful. </span></font></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">The limit imposed by the </span><span style="font-size:12pt;background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">CurrentMaxHeapSize </span><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">can be disabled if the variable is unset at launch time or if it is set to zero or below at runtime.</span></font></div><font face="arial, helvetica, sans-serif" style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">This feature is important to cope with changes in workload demands and to avoid having to restart JVMs to cope with workload changes.</font></span></div><br class="m_6038632066700076450gmail-Apple-interchange-newline"></span></div><br></div>
</div></blockquote></div><br></div></div></blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Ruslan <br>CEO @ Jelastic</div>