File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Memory allocation in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Memory allocation in Tomcat" Watch "Memory allocation in Tomcat" New topic

Memory allocation in Tomcat

Victor Ho
Ranch Hand

Joined: Sep 05, 2003
Posts: 74

I'd like to know if Tomcat divides the overall JVM heap into different compartments for different web application?

I am facing a situation where one webapp is noticeably slow, while another app is running swiftly. Signs are showing it is due to memory problem, as the slower webapp runs much better after incrasing the -Xmx. But my wonder is that if VM heap size was originally the problem, wouldn't it be a problem for the second (faster) webapp also?

Thanks for your inputs.

- Victor
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Tomcat does not play any tricks with memory, it just uses the normal JVM memory allocation. More recent versions of Java have added lots of configuration options for memory management - you would have to pass these to Tomcat when it starts.

Your observed difference is webapp response is probably due to the webapp programming and use of resources.

I agree. Here's the link:
subject: Memory allocation in Tomcat
It's not a secret anymore!