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 08:56:01 GMT
Filip Hanik .. and many others - Dev Lists wrote:
[...]
Thanks for all the answers, very enlightening.
In summary thus :
- Tomcat (or rather I suppose the Connector) will create new threads as 
needed to service simultaneous requests, up to the number given in the 
Connector's maxThreads attributes.
- Once such a thread is created, it remains alive after servicing the 
request for which it was created, and can thus service future requests
- 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.


Now let me elaborate one step further, and let me know if this is correct :

If in a Tomcat I have one HTTP Connector and one AJP Connector (used 
with mod_jk), they are two distinct Connectors. (I don't really expect 
dissent here, but who knows ?)

Each one will create new threads as needed to service requests on *that* 
Connector, independently of the other Connector.

So if I access the same application (webapp) multiple times 
indifferently through one Connector or the other, this will result in 
two groups of threads, one group per Connector, each group behaving 
independently like indicated above in the summary. Right ?

If right, then it means one would do better choosing if one can, and 
always access this application through either one of the Connectors, but 
not both, right ?

Or, considering both groups are in the end executing the same webapp 
application, would the memory used by the two groups of threads end up 
being largely shared also anyway ?


---------------------------------------------------------------------
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