I've got a Red Hat box with 6G memory running Tomcat and I'm trying to figure out how much memory I have left on the box. Problem is, top & jconsole is showing one figure (around 200M), and system monitor is showing a different figure (around 2G). Does anybody know what the difference is?
I'm not sure if there is a memory leak happenning here, but the highest memory consumer is a tomcat process that's taking 2.2G of memory.
Screenshots below:
Added the free command screenshot:
Go into the heap dump settings for your server Right-click on Tomcat from the sidebar on the left-hand side then select 'Heap Dump'.
Clearly, top is telling you that Tomcat is only using 38% of your available memory. Your problem (if there is a problem) is with whatever is using the remaining 62% of memory.
I suspect that it is being used for disc block / file system caching. (Run the free
command and I expect that you should see a high value for "cached" that roughly corresponds in size to the missing pages.)
If your system has a large number of pages in the cache, it is a GOOD THING. All those cached disc blocks will make read access to your file system nice and fast. (And if the OS needs physical pages for something more important ... like running applications ... it can quickly reclaim them from the disc cache.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With