Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help in understanding the memory usage in Tomcat

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I used the Jconsole tool to monitor my Tomcat server. In the graphs related to memory, I see that both the Heap and Nonheap memories are constantly increasing.

I created a sample JSP and added some java code as below




The output of this java code is same as that of the memory statistics shown by Jconsole.

In both the cases, I observed the constant increasing value and when the GC is executed by Tomcat by itself, the memory is freed and again constantly increased.

My web app is not serving any requests other than the Jconsole and my sample JSP.

Now my question is, does the method getHeapMemoryUsage() will show the consolidated memory usage right from the server startup or the amount used by the Heap at the instance the method is called?

 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I think that this thread relates to this other thread you opened: https://coderanch.com/t/626640/Tomcat/understanding-memory-usage-Threads-Tomcat

Rather than confuse people, I'm going to close this thread so we can answer all your memory questions in one place.
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic