<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tomcat process memory is higher than the jvm heap memory in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244818#M32185</link>
    <description>&lt;P&gt;Observation - in your heap memory chart, I don't see any garbage collection activity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Guess - some stuck thread that cascades in the application to build up threads/stack-memory-consumption - with a overall process "hang" at 10:30.&lt;/P&gt;&lt;P&gt;You need a thread dump or heap dump to analyze what is in there that may be the culprit.&lt;/P&gt;&lt;P&gt;If this is hard to do in retrospect, is there a possibility to load-test the app in a lower environment (PTE), and analyze threads and heap objects there?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are two good discussions of the differences in heap memory vs process memory -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/8037920/tomcat-memory-consumption-is-more-than-heap-permgen-space" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/8037920/tomcat-memory-consumption-is-more-than-heap-permgen-space&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.digitalocean.com/community/tutorials/java-heap-space-vs-stack-memory" target="_blank" rel="noopener"&gt;https://www.digitalocean.com/community/tutorials/java-heap-space-vs-stack-memory&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 04 May 2024 04:49:56 GMT</pubDate>
    <dc:creator>richard_guerra</dc:creator>
    <dc:date>2024-05-04T04:49:56Z</dc:date>
    <item>
      <title>Tomcat process memory higher than the JVM heap memory</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244806#M32182</link>
      <description>&lt;P&gt;We are running a SpringBoot application in tomcat 9.x with OpenJDK11. This application is hosted on a VM.&lt;/P&gt;
&lt;P&gt;We have been observing high memory utilization of the tomcat process in dynatrace. "Memory Usage" graph of the process is showing 5.3gb while the heap memory usage is 2 gb. Can someone help me where the remaining 3.3gb memory is used?&lt;/P&gt;
&lt;P&gt;Note: tomcat profile contains only one application running in it. We are using&amp;nbsp;&lt;SPAN&gt;Xms as 1024m and Xmx as 4096.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="heap-memory.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19649iDEB13AF66A9B8DF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="heap-memory.jpg" alt="heap-memory.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="process-memory.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19650i986F6905371E8C48/image-size/large?v=v2&amp;amp;px=999" role="button" title="process-memory.jpg" alt="process-memory.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 11:27:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244806#M32182</guid>
      <dc:creator>naveench</dc:creator>
      <dc:date>2024-05-23T11:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: tomcat process memory is higher than the jvm heap memory</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244818#M32185</link>
      <description>&lt;P&gt;Observation - in your heap memory chart, I don't see any garbage collection activity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Guess - some stuck thread that cascades in the application to build up threads/stack-memory-consumption - with a overall process "hang" at 10:30.&lt;/P&gt;&lt;P&gt;You need a thread dump or heap dump to analyze what is in there that may be the culprit.&lt;/P&gt;&lt;P&gt;If this is hard to do in retrospect, is there a possibility to load-test the app in a lower environment (PTE), and analyze threads and heap objects there?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are two good discussions of the differences in heap memory vs process memory -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/8037920/tomcat-memory-consumption-is-more-than-heap-permgen-space" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/8037920/tomcat-memory-consumption-is-more-than-heap-permgen-space&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.digitalocean.com/community/tutorials/java-heap-space-vs-stack-memory" target="_blank" rel="noopener"&gt;https://www.digitalocean.com/community/tutorials/java-heap-space-vs-stack-memory&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 04:49:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244818#M32185</guid>
      <dc:creator>richard_guerra</dc:creator>
      <dc:date>2024-05-04T04:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: tomcat process memory is higher than the jvm heap memory</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244872#M32191</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/75388"&gt;@naveench&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I agree with what was mentioned by&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/39338"&gt;@richard_guerra&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;In the link shared by Richard, the case is similar to the one mentioned.&lt;BR /&gt;And it is based on the concept that "Memory usage" is not only Heap Memory, but there are also many more factors:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PierreGutierrez_0-1714942470456.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19670iE88A2C59D534A5A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PierreGutierrez_0-1714942470456.png" alt="PierreGutierrez_0-1714942470456.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I also mention that seeing that your process is using 5.3 GB of which you assign a maximum of 4 GB for only heap Memory, makes me think that you can optimize that parameter.&amp;nbsp; I found some important information about it here:&amp;nbsp;&lt;BR /&gt;&lt;A href="http://seminarisempresa.fib.upc.edu/aulesempresa/2011/programes/Bitendian/Llista-documents/0/document/metodologies-tuning.pdf" target="_blank"&gt;Java Experto: rendimiento (upc.edu)&lt;/A&gt;&amp;nbsp; &amp;nbsp;,&amp;nbsp;&lt;A href="https://docs.oracle.com/en/graalvm/jdk/21/docs/reference-manual/native-image/optimizations-and-performance/MemoryManagement/" target="_blank"&gt;https://docs.oracle.com/en/graalvm/jdk/21/docs/reference-manual/native-image/optimizations-and-performance/MemoryManagement/&lt;/A&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;The best way is to apply parameters and apply load tests on your service, to arrive at the parameters that are useful to you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I hope it's helpful &lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2024 21:00:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244872#M32191</guid>
      <dc:creator>PierreGutierrez</dc:creator>
      <dc:date>2024-05-05T21:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: tomcat process memory is higher than the jvm heap memory</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244876#M32193</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/75388"&gt;@naveench&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Completing Richard and Pierre comments, a best practice is configuring the same value for -Xms and -Xmx parameters. And these values shouldn't exceed 4096M. JVMs don´t usually handle propertly values greater than 4GB.&lt;BR /&gt;You can also add to the JVM configuration parameters the GC algorithm (G1, Epsilon or Serial) to managed heap. This usually works fine.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;BR /&gt;Regards,&lt;BR /&gt;Elena.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 04:38:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244876#M32193</guid>
      <dc:creator>erh_inetum</dc:creator>
      <dc:date>2024-05-06T04:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: tomcat process memory is higher than the jvm heap memory</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244953#M32212</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/39338"&gt;@richard_guerra&lt;/a&gt;&amp;nbsp;, thats good observation. We will get the heap and thread dumps and will review them.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:09:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244953#M32212</guid>
      <dc:creator>naveench</dc:creator>
      <dc:date>2024-05-06T20:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: tomcat process memory is higher than the jvm heap memory</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244958#M32216</link>
      <description>&lt;P&gt;thanks for your suggestions&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40722"&gt;@erh_inetum&lt;/a&gt;&amp;nbsp; we will update the configuration parameters.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:51:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Tomcat-process-memory-higher-than-the-JVM-heap-memory/m-p/244958#M32216</guid>
      <dc:creator>naveench</dc:creator>
      <dc:date>2024-05-06T20:51:12Z</dc:date>
    </item>
  </channel>
</rss>

