Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Help! Config of multiple hosts and JVM garbage.

Help! Config of multiple hosts and JVM garbage.

2004-02-09       - By Antonio Fiol Bonn�n

 Back
Reply:     1     2     3     4  

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


©2008 junlu.com - Jax Systems, LLC, U.S.A.