• 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

Virtual hosts and shared libraries

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
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 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?
 
Oleg Tim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic