• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web App Heap Size

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic