<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<span class="elementToProof ContentPasted0" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">Hi Severin,</span>
<div class="elementToProof" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
<br class="ContentPasted0">
</div>
<div class="elementToProof ContentPasted0" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
There should be some way to get the memory of the container host, but I'm not sure it should be stored in jdk.PhysicalMemory#totalSize.</div>
<div class="elementToProof" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
<span style="margin:0px"><br class="ContentPasted0">
</span></div>
<div class="elementToProof" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
<span style="margin:0px" class="ContentPasted0">It may make sense to normalize all event data to the same logical entity, regardless if it is physical, virtualized or containeried. I believe (but not sure) the CPU Load event shows 100% if all the cpu time is
 used in a container.</span></div>
<div class="elementToProof" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
<br class="ContentPasted0">
</div>
<div class="elementToProof ContentPasted0" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
An alternative would be to add a field to the container events which specifies total memory of the host.</div>
<div class="elementToProof" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">
<br class="ContentPasted0">
</div>
<span class="elementToProof ContentPasted0" style="font-size:12pt;margin:0px;background-color:rgb(255, 255, 255)">Erik</span><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> hotspot-jfr-dev <hotspot-jfr-dev-retn@openjdk.org> on behalf of Severin Gehwolf <sgehwolf@redhat.com><br>
<b>Sent:</b> Thursday, November 10, 2022 2:56 PM<br>
<b>To:</b> hotspot-jfr-dev@openjdk.org <hotspot-jfr-dev@openjdk.org><br>
<b>Subject:</b> RFC: jdk.PhysicalMemory vs. jdk.ContainerConfiguration expected behaviour?</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
I've noticed that jdk.PhysicalMemory event reports the container memory<br>
instead of the actual total memory of the container host. If one<br>
compares 'memoryLimit' property of jdk.ContainerConfiguration events to<br>
the 'totalSize' of jdk.PhysicalMemory event you'd notice that they're<br>
the same inside a container. See [1].<br>
<br>
As JFR is a monitoring tool it would be useful to get the hosts value<br>
even inside a container via jdk.PhysicalMemory and the container value<br>
via jdk.ContainerConfiguration (or some other event). If that was the<br>
case, one could better reason about the actual system the app is<br>
running on.<br>
<br>
Would this make sense? Thoughts?<br>
<br>
Thanks,<br>
Severin<br>
<br>
[1] <a href="https://bugs.openjdk.org/browse/JDK-8296671">https://bugs.openjdk.org/browse/JDK-8296671</a><br>
<br>
<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>