tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: how many linux processes should tomcat create???
Date Sat, 07 Dec 2002 02:34:50 GMT


On Fri, 6 Dec 2002, Brandon Cruz wrote:

> Date: Fri, 6 Dec 2002 09:28:30 -0600
> From: Brandon Cruz <bcruz@norvax.com>
> To: craigmcc@apache.org, Tomcat List <tomcat-user@jakarta.apache.org>
> Subject: RE: how many linux processes should tomcat create???
>
> Craig,
>
> I know that actually, just mistyped.  I had talked to you about this
> earlier, but should it be creating that many threads?  The issue is that
> there seems to be a manager thread that monitors all of these and with that
> many threads running, the manager starts taking up a large amount of CPU and
> slows the system down.
>

The threads that Tomcat 4.x creates can be categorized as follows:

* Request processing threads (configured in your
  <Connector> elements) that are shared across
  all virtual hosts and webapps

* Per-host thread that manages live deployments
  (automatically adding new apps dropped into "webapps")
  if liveDeploy="true" -- should not be enabled on a
  production server.

* Per-webapp thread to process reloading on class
  recompilation if reloadable="true" -- should not
  be enabled on a production server.

* Per-webapp thread to process session invalidations.

So, the thread counts you report sound about right for the number of hosts
you report.

It would be technically feasible to process session invalidations for all
webapps in a single thread (or some smaller number of threads allocated
out of a pool), but this has never actually been programmed.  There is
also some element of risk -- webapps can register things that get called
when the session is timed out (HttpSessionBindingListener,
HttpSessionEventListener), so a malicious or broken application could
negatively affect timeouts for other apps running in the same server
unless this were done very carefully.


> Brandon
>

Craig



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message