On Fri, 6 Dec 2002, Brandon Cruz wrote:

> Date: Fri, 6 Dec 2002 09:28:30 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED], Tomcat List <[EMAIL PROTECTED]>
> 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to