tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat threads
Date Wed, 12 Nov 2008 14:38:44 GMT
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> André,
> 
> André Warnier wrote:
>> - The memory usage one sees with "top" under some versions of Linux for
>> each one of these threads is not really cumulative, because most of it
>> is actually shared between the threads.  The total really used is only
>> slightly more than what is indicated individually for each thread.
>> In other words, after the first thread is created, each additional
>> thread only adds a relatively small overhead.
> 
> Actually, it gets better than that if you have multiple 1.5+ JVMs
> running on the same machine (*NIX /or/ Windows), since recent JVMs use
> shared memory to share common class data (like JITed object code from
> java.* packages). So, the OS helps share data between JVMs if you have
> several of them running.
> 
So, let me check if I get this correctly.

Suppose for some reason I would have two independent Tomcat instances 
running on the same host, using the same JVM 1.5+, sharing a common 
CATALINA_HOME, running basically the same applications, but having each 
an individual CATALINA_BASE,  then :
- they would actually share (in memory) the compiled classes that are 
part of the standard Java library (java.* etc..)
- they would also share (in memory) the classes that are loaded from 
some area under the CATALINA_HOME (I suppose most of the Tomcat-specific 
classes)
- they would not share the classes that are loaded from under their 
individual CATALINA_BASE

And is the fat that 2 classes are "the same" and can be shared dependent 
of where they are loaded from in terms of path, or does Java/Tomcat have 
a way to figure out that they are the same otherwise ?

Elaborate.

.. a bit, please.



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message