> From: André Warnier [mailto:[EMAIL PROTECTED]
> Subject: Tomcat threads
>
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> , referring to the third paragraph of the Introduction.

Note that the 6.0 doc is missing some very important attributes for the 
<Connector> element.  Apparently, the intent was to replace all the <Connector> 
thread pools with a common <Executor>, but that doesn't seem to have panned out 
very well.  The 5.5 doc is better for this discussion.

> Am I right in assuming that, as soon as one of these threads is done
> processing his current request, it disappears again ? Or does it stick
> around doing nothing for a while ?

As many as maxSpareThreads will stick around forever to avoid the overhead of 
thread creation.

> And is there a "minThread" setting, or is that automatically
> 1, the one thread listening for new requests ?

The minSpareThreads attribute specifies the number to create when the 
<Connector> initializes.

> and sees it using e.g. "250m" of memory, is that memory really used at
> that point ?

No - Linux threads from the same process share nearly all of their memory, so 
the number is rather misleading.  It's the amount of process space memory each 
individual thread can "see", but the aggregate is really only slightly larger 
than what each thread has.

> And if 3 requests were to come in very rapidly, resulting in 3 new
> threads being started, would each of these threads really
> require "250m" bytes in order to run ?

No - each additional thread requires only a small amount of additional memory 
(e.g., a Thread object in the Java heap, Java stack space, C stack space).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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

Reply via email to