Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory allocation in Tomcat

 
Victor Ho
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic