• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web App Heap Size

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is a good way of determining heap sizes for a web application without the obvious 'if you get an out of memory exception increase the heap'? I've been looking at different web hosting companies to host a few of my applications but they all seem to be partially priced based on heap size of the VM for Tomcat. I know the default is 64m but I'd like to know good ways of determining this if possible.

Thanks.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the web applications of the tomcat server run within the same JVM.Before starting the tomcat we can set the max heap size for the tomcat and I do not think that we can change that on the fly without bringing down the tomcat.

One more thing I would like to ask as I have never enquired about how the web apps are deployed in tomcat in production.Do they configure the tomcat's JVM's heap size for every application ?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rahul Bhattacharjee:
All the web applications of the tomcat server run within the same JVM.Before starting the tomcat we can set the max heap size for the tomcat and I do not think that we can change that on the fly without bringing down the tomcat.


That's not what I asked.

Originally posted by Rahul Bhattacharjee:
One more thing I would like to ask as I have never enquired about how the web apps are deployed in tomcat in production.Do they configure the tomcat's JVM's heap size for every application ?


Please don't hijack this thread. You are more than welcome to start your own thread and this question would be more appropriate in the tomcat forum.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure there is an easy way to find out 'per application'.
If you're using container manage connection pooling, or other JNDI resources, then muliple apps under the same container could, potentially be sharing some resources.

Have you looked into profilers like JProbe or Optimizeit?
Load testing while monitoring with a profiler seems like it would give you the most realistic estimate.

I've just started playing around with the JConsole app that ships with Sun's JDK1.5.0. It's got some nice, real time, memory usage graphs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic