<div dir="ltr"><span id="gmail-docs-internal-guid-b8f1a28c-7fff-03e0-7c9b-fe9facd0a001"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Hi Thomas,</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Thank you for the context, in particular link [2]. </span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">I will look into whether my implementation satisfies the comments you left on [2]. If so, it might be worth it for me to prepare a patch for review, and see if there are any potential negative interactions with my implementation that I may have missed. </span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">I'm going to be busy traveling until around mid-late October, so I will resume discussion regarding these contributions around that time. (I am actually going to be speaking about Adaptable Heap Sizing at </span><a href="https://devoxx.be/" style="text-decoration-line:none"><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">Devoxx</span></a> [a]<span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">, so if any of you are going to be there, please feel free to attend my <a href="https://devoxx.be/talk/?id=20741">talk</a> [b]/reach out during the conference to learn more!)</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">In the meantime, I appreciate all the feedback so far! It has given me confidence to continue to work on this project and help make contributions upstream.</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Thank you!</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">~ Jonathan</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">[a] <a href="https://devoxx.be/">https://devoxx.be/</a></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">[b] <a href="https://devoxx.be/talk/?id=20741">https://devoxx.be/talk/?id=20741</a></span></p></span><br class="gmail-Apple-interchange-newline"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 26, 2022 at 1:44 AM 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>
On 22.09.22 11:16, Man Cao wrote:<br>
> Hi all,<br>
> <br>
> Great to see so many responses in this thread! I work with Jonathan and <br>
> reviewed all design and implementation aspects of AHS.<br>
> <br>
> Adding a few more comments to Jonathan's response:<br>
[...]<br>
> <br>
> Now it seems a great time to get [1] and [2] implemented, so AHS can <br>
> actually converge. Are there recent prototypes for them? What are the <br>
> main problems in those prototypes? Jonathan and I could take a look and <br>
> help get them implemented.<br>
> <br>
<br>
From what I understand the main issue is thinking about and defining <br>
interaction with existing Min/Initial/MaxHeapSize flags (e.g. [1]).<br>
<br>
SoftMaxHeapSize otherwise seems to be relatively unproblematic.<br>
<br>
Iirc specifically for the Current/HardMaxHeapSize flag, the <br>
implementation needs to be thought through in more detail. There is an <br>
initial list of problems ([2]) that should be worked through and defined <br>
as it has much more external impact.<br>
<br>
> For the AHS main logic that sets the manageable JVM flags, currently it <br>
> resides in a native thread started by our own Java launcher. [3] has a <br>
> description on what our launcher does.<br>
> However, the main logic could be implemented in other places, such as a <br>
> Java agent, a JNI library, or another process. We could do some rework <br>
> to make the main logic a JNI library, then open-source it.<br>
> We also agree with Thomas that the AHS main logic is not suitable to be <br>
> integrated into the JVM, as it varies greatly depending on the <br>
> deployment environment (e.g., the container technology, OS, additional <br>
> external signals that should be taken into account).<br>
> <br>
> Besides [1] and [2], another required JVM feature is monitoring metrics <br>
> for GC CPU time. We added hsperfdata counters in our JDK 11 for this, <br>
> and I will create RFEs to upstream them. After all, it seems unlikely <br>
> that AHS needs another JEP.<br>
<br>
I have no strong opinion about doing a JEP for this.<br>
<br>
> @Thomas<br>
> > SPECjbb2015 is a standard industry Java VM performance benchmark<br>
> > (<a href="https://www.spec.org/jbb2015/" rel="noreferrer" target="_blank">https://www.spec.org/jbb2015/</a> <<a href="https://www.spec.org/jbb2015/" rel="noreferrer" target="_blank">https://www.spec.org/jbb2015/</a>>). <br>
> Unfortunately it's commercial.<br>
> > ...<br>
> > b) and during measurement phase, SPECjbb2015 has a peculiar way of<br>
> > trying to find maximum sustainable load.<br>
> > ...<br>
> Thanks for the details on specjbb2015!<br>
> We did try SPECjbb2015 for benchmarking earlier (Jonathan was not <br>
> involved at that time), but did not pursue running it regularly as we <br>
> did not find it representative enough to our typical server workload.<br>
> The peculiar way of finding maximum load (sudden allocation spike after <br>
> a quiescence period) does sound problematic for most GC heuristics. It <br>
> does NOT sound like an important case to optimize in the real world. <br>
> Real-world server workload typically ramps up and ramps down gradually, <br>
> corresponding to daily traffic patterns. Batch and desktop applications <br>
> are more likely to have phased behavior, but such phase changes should <br>
> only last for a short, temporary period.<br>
Thanks,<br>
Thomas<br>
<br>
[1] <br>
<a href="https://bugs.openjdk.org/browse/JDK-8236073?focusedCommentId=14368061&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14368061" rel="noreferrer" target="_blank">https://bugs.openjdk.org/browse/JDK-8236073?focusedCommentId=14368061&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14368061</a><br>
[2] <a href="https://mail.openjdk.org/pipermail/hotspot-gc-dev/2018-June/022472.html" rel="noreferrer" target="_blank">https://mail.openjdk.org/pipermail/hotspot-gc-dev/2018-June/022472.html</a><br>
</blockquote></div>