We're currently having a Private Tomcat (version 6.0.16) hosting package, which gives us plenty of control over server, tomcat. So basically we're happy. But after deploying almost each and every new Java Application to Tomcat, we have to purchase more Heap size, which is ok and reasonable on the other hand.
The question is How much Heap Memory Size per application we need? I know that the more, the better, but what is the minimum of it?
Applications are generally a typical struts/spring/hibernate integration. The current is 32 MB starting, 128 MB maximum, and 4 applications work perfectly fine, but for recently deployed 5th and 6th, sweet little PermGen is there, slap me in the face!
If there are more things I should tell in order for "an" answer or a better one, please tell me to find that out. I don't think of anything else right now.
Khosrow Moossavi wrote:The question is How much Heap Memory Size per application we need? I know that the more, the better, but what is the minimum of it?
"Too Big to Fail" doesn't work for heap memory size. Garbage collection could slow down the application, while cleaning large heap. There are plenty of information on web regarding JVM tuning. Keep in mind that you have to find guidelines for your particular JVM flavor.
Well I have not considering monitoring that much, because we were good both in Development and Deployment environment. But after this, I've installed Java-monitor and here is the Result about Heap, PermGen and GC:
java.lang:type=MemoryPool, name=PS Perm Gen
Usage.used: 107 MiB and 588 KiB
Usage.committed: 114 MiB and 256 KiB
Usage.max: 128 MiB
NonHeapMemoryUsage.committed: 120 MiB and 384 KiB
HeapMemoryUsage.used: 87 MiB and 667 KiB
NonHeapMemoryUsage.used: 113 MiB and 119 KiB
NonHeapMemoryUsage.max: 176 MiB
HeapMemoryUsage.max: 113 MiB and 832 KiB
HeapMemoryUsage.committed: 109 MiB and 512 KiB
CollectionTime: 1 second and 426 milliseconds
Well, to be honest I didn't google for these terms yet. But are we good or anything seems not working all right?
What Monitor Application should I use? There are plenty out there and I couldn't decide what is good, so I went for the one that is on Kees Jan's signature.