tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Fiol BonnĂ­n <fiol.bon...@terra.es>
Subject Re: Help! Config of multiple hosts and JVM garbage.
Date Mon, 09 Feb 2004 07:11:29 GMT
Sergio wrote:

>Hi All! Guys, I need help!
>My system is Windows 2003 Enterprise Server with Apache 2.0.48
>I need Windows for 3rd part application, but because I hate IIS so I am
>using Apache2(the best!!!).
>
>1)Does somebody can help me with configuration of Tomcat 5.0.18 for multiple hosts? I
need to deploy
>servlets separately for each user. Access will be configured in
>httpd.conf of Apache2.0.48 Some people uses multiples instances of Tomcat for each user.
>Somebody uses one instance of Jboss with various deployed folders (its actually my configuration
>now). But I need to do that trick with Tomcat. The biggest problem for
>me now - its to configure server.xml for two or more hosts. I cant
>find it in documentation. If you can help with with any tips and/or your examples of
>httpd.conf, workers.prop..s etc. (all related parts of configuration
>of the servers) - please help.
>  
>

I have never set up VirtualHosts in Tomcat. But if you do not need to 
have a "root" app, you do not need to (or at list I did not need to). 
Just "mount" the apps you need in the Apache VirtualHosts you need, and 
you are done.

>2) How I can configure memory management for Tomcat (limits for memory using for each
>process/application)? Is it possible somehow?
>  
>

Not possible when using a single JVM.
If you use multiple instances of Tomcat, you can set -Xmx256m (or 
whatever amount you need) in JAVA_OPTS environment variable. That will 
effectively limit the amount of memory used by your heap.

>3) I have a problem with garbage of JVM caching. Any suggestions how I
>can organize "autocleaning"? How can I minimize the usage of the disk
>in this case?
>  
>
What do you mean by disk usage? How is that related do "autocleaning", 
which I understand as "garbage collection"?

Do you mean swapping? If so, ensure that your JVM is at most as big as 
your free _real_ memory. Otherwise, your OS qill start swapping unused 
bits. Then, the GC will reclaim them for collection. So, you are 
accessing the disk at least twice for something you could have avoided. 
(Side note: Get more RAM ;-)

In any case, profiling your applications is a good way to go: you willl 
determine whether your app grows in memory usage with time, or if it 
remains constant. (Consider the former a bug.) If memory usage remains 
constant, you can stress your app, and determine how much memory it 
needs for "full load", and then you may allow it (JAVA_OPTS) no more 
than that, knowing it will work.


Yours,


Antonio Fiol


Mime
View raw message