<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<font face="Courier New" style="font-size: 15px;" class="">Dear Thomas and Charlie,</font>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> Thanks for your suggestions. </font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> Let me describe more about my experiment. I am trying JDK11 on some sort of server node with huge heap at ~400GB. And it needs to keep the responsiveness so that long pause time
of GC is not acceptable. </font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> And for some reason, if the server node paused for a long time (say 60s), the whole process will be killed and hence cause disaster. </font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> With JDK11 using G1, after some measurement I believe that keep MaxGCPauseMills at 200ms is reasonable and works well when there is no MixedGC - And also want to mention that the server
node is super busy at allocation so there are usually 2~3 YGCs per minute.</font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> The problems comes with Mixed GC, I observed mainly two issues about it:</font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> a. There is super long pause time for MixedGC. Some times I found the whole process is killed because the MixedGC paused over 60s.</font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> b. There is back-to-back long MixedGCs, for examples, there can be 2~3 mixedGC within one minutes, and every one of them tooks ~30s. so the process get killed.</font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> For issue a, I think it seems that the collection set may be too large to be collected in low pause times. So I have tried to enlarge XX:G1MixedGCCountTarget to reduce the CSet for
every MixedGC. But it seems this option could introduce more MixedGCs overall, which affected more or less of latency when normal MixedGCs happened. (Usually there is a batch of mixedGCs after concurrent marking, and seems the count of mixedGCs in a batch
grows by enlarging XX:G1MixedGCCountTarget ), and this may cause issue b more severe.</font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""> I also tried the option of <span style="color: rgb(51, 51, 51); orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">-XX:G1HeapWastePercent, and it could more or less
help reduce the MixedGC pause, but it shows if I enlarge it too much , more MixedGCs are going to happened. </span></font></div>
<div class=""><font face="Courier New" style="font-size: 15px;" class=""><span style="color: rgb(51, 51, 51); orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""><br class="">
</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font face="Courier New" style="font-size: 15px;" class=""><span style="color: rgb(51, 51, 51); orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class=""> </span></font><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class="">I
come to consider that those options are good but they takes effect to all mixedGC’s, even for the cases that MixedGC pause time are acceptable.I tried to find a way to control the Cset by pause times, and I found the JEP344, after trying it in my case the
long pause mixedGC is reduced by only introducing more low pause mixedGCs in that specific batch. </span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class=""><br class="">
</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class=""> PS. for the issue b mentioned, I think JEP344 may not help a lot. My data shown it comes from the updateRS&scanRS
time, the tuning guide mentioned that so I will try it.</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class=""> And thanks for guiding me, I also cc this thread to jdk-updates-dev.</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class=""><br class="">
</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class=""><br class="">
</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class="">BRs,</span></font></div>
<div style="orphans: auto; widows: auto; " class=""><font color="#333333" face="Courier New" class=""><span style="font-size: 15px;" class="">Lin</span></font></div>
<div class=""> <br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">在 2019年3月29日,上午3:31,Thomas Schatzl <<a href="mailto:thomas.schatzl@oracle.com" class="">thomas.schatzl@oracle.com</a>> 写道:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi Lin,<br class="">
<br class="">
On Wed, 2019-03-27 at 10:51 +0000, 臧琳 wrote:<br class="">
<blockquote type="cite" class="">Dear All, <br class="">
I have tried the JEP344 for a while and find it could help us to<br class="">
avoid the long Mixed GCs when the heap is large. <br class="">
</blockquote>
<br class="">
It is great to hear that it helps you in your case.<br class="">
<br class="">
I assume you tried some tuning with the options presented in the<br class="">
documentation at <br class="">
<a href="https://docs.oracle.com/en/java/javase/12/gctuning/garbage-first-garbage-collector-tuning.html#GUID-D2B6ADCE-6766-4FF8-AA9D-B7F4F3D0F469" class="">https://docs.oracle.com/en/java/javase/12/gctuning/garbage-first-garbage-collector-tuning.html#GUID-D2B6ADCE-6766-4FF8-AA9D-B7F4F3D0F469</a><br class="">
?<br class="">
<br class="">
Note that in some cases this still might not result in as nice behavior<br class="">
as with abortable mixed gc.<br class="">
<br class="">
<blockquote type="cite" class=""> So I am planning to port it back to jdk11u as G1 is the default<br class="">
GC, do you think it is reasonable?<br class="">
</blockquote>
<br class="">
I believe it is okay if it is useful, but it is best to ask the<br class="">
maintainers of jdk11u directly in on the jdk-updates-dev mailing list.<br class="">
As this would be a bit bigger change/backport, so there might be some<br class="">
further concerns by the jdk11u maintainers.<br class="">
<br class="">
Code review seems to have to occur on the jdk-updates-dev mailing list<br class="">
(https://openjdk.java.net/projects/jdk-updates/codereview.html) - maybe<br class="">
cc hotspot-gc-dev though.<br class="">
<br class="">
Thanks,<br class="">
Thomas<br class="">
<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">
BRs,<br class="">
臧琳 Lin Zang<br class="">
京东零售-数据中台-数据基础平台部-平台架构部-高性能集群研发部<br class="">
---------------------------------------------------------------<br class="">
手机/+86 15801317152<br class="">
邮箱/<a href="mailto:zanglin5@jd.com" class="">zanglin5@jd.com</a><br class="">
地址/北京市亦庄经济技术开发区经海七路科创11街8号院<br class="">
---------------------------------------------------------------<br class="">
</div>
<span><img apple-inline="yes" id="64A53C5E-989F-4220-A84D-8C633E4A786C" src="cid:image001.png@01D4E4CB.41D6B0B0" class=""></span>
</div>
<br class="">
</div>
</body>
</html>