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.
Garbage collection could slow down the application, while cleaning large heap.
Actually most JVMs these days run an incremental garbage collector instead of a "wait till it's full and then shut everything down while we GC".
But merely adding more resource demands to the server is enough to slow it down anyway. Then again, what use is an idle server?
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 08, 2005
Thank you guys for your answers.
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.
Kees Jan Koster
Joined: Mar 31, 2009
Welcome to Java-monitor. :-)
It is actually more useful to post the graphs, rather than the actual values. The graphs show how memory develops over time and the stats you posted are just a snapshot.
You will find a "post graph" button under each one. Please post the heap memory graph on Java-monitor and I'll help you there. :-)