This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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: 12890
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