• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Virtual hosts and shared libraries

 
Fedor Smirnoff
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got a problem with Tomcat using a huge amount of memory on startup. Of course I realize that it all depends on how large are the applications. However, I have lets say two identical machines with Tomcat 5.5 installed.
One Tomcat has 100 virtual hosts running the same application and takes up 400MB of ram after it finished loading, second Tomcat has 300 identical applications but deployed under localhost and it uses only 200MB of ram after loading. Can somebody explain me what is the case here? Does it mean that virtual hosts load all libraries in shared directory for every host into memory but all application running under localhost, simply load them once? I am a bit lost, I need to figure something out to cut down on memory use, any ideas? All users are running same application, application specific classes are in its own application WEB-INF/classes and all libraries needed to run the application, like struts and hibernate and so on are in tomcat/shared. Thank you.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure about your original question but..
Is it possible that the machine with 300 apps is using less memory because it reached the threshold that would trigger garbage collection (GC) where the machine with 100 apps hasn't?
 
Fedor Smirnoff
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I watch the memory grow as tomcat is starting up, the memory is growing as applications being loaded, so its not an issue with garbage collection
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic