View Full Version : Memory heap
gunasekar
10-09-2009, 15:51
http://java-monitor.com/postedimages/b2d5dfe1-7916-4d69-8310-60d8c380b24c.png
What to u think about the applications running on the tomcat server after having a look at the graph.
Will the application survive or crash.
kjkoster
10-09-2009, 15:59
Dear gunasekar,
It looks to me like the application is really, really short on memory. If the memory use remains about 50MB for the rest of the time, the app will survive. It will probably be dog slow due to excessive garbage collects. If you check out the GC time graph, you can see how much time the app spends garbage collecting.
My advise is to either reduce memory consumption or giving the server more memory to work in.
Kees Jan
gunasekar
10-09-2009, 16:12
Ya that was the doubt i was having with it. Thanks a lot for your reply.
But is there any way i can find out the jvm space my server is having.
So that i can check with it and try to increase the memory space.
And inorder to reduce the garbage collection time wat can be done? Any kind of input would be of a great help. Any conventions that i can follow while doing codes.
kjkoster
10-09-2009, 16:21
Dear gunasekar,
Your JVM space is the red line at the top of the graph you posted: about 64MB. You can give the JVM more memory by starting it with the option -Xmx on the command line. For example, "java -Xmx256M" gives it 256MB to use instead of the default 64MB.
As for coding: don't cache more than you need to. Keep you session objects small and don't use global maps and lists to store data. That's a few things to keep in mind.
Kees Jan
gunasekar
10-09-2009, 16:26
Ok thanks a lot. Will try out increasing the space of the JVM.
Do you think a JVM having 64 MB space is fine for having a web application running.
And is increasing the JVM space a good practice.http://java-monitor.com/forum/images/smilies/smile.gif
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.