Tom Jackson schrieb:
I've been working on a slightly different angle here, trying to avoid thread exit, and to allow threads to range usefully between min and max. The current code in CVS has a number of problems which lead to the server not creating more threads when there are queued requests and the number of threads is below max (sometimes below min!).
concerning the code in cvs head:
the server creates now worker threads when a
- thread exits and more requests are queued,
 and no other thread is idle, or when a
- thread exits and the number of connection threads
 falls below minthreads,
both cases unless shutdown. The handled thread
exists are typically due to exceeding maxconns
or the idle timeout.

This is what my tests show. What are the problems? Or are
you taking about the version in cvs before these changes?
Of course, before these changes, minthreads was respected
only at startup, queued requests were not processed.

My first solution was based on a strategy, where a
thread did not exit, when there was more to do (more
queued requests), allthough it should exit due to maxconns.
However, a user specifying maxconns might have good
reasons for doing so, therefore the value must be respected.
Avoiding exit in this situation is not viable option IMHO.

It can be discussed, whether the idle timeout should be
obeyed e.g. in situations where number of threads is
below minthreads. In the code in cvs the thread exits
and is recreated as in other cases, when it falls below
minthreads. It would be more efficient to avoid the
timeout in such situations, but one might end up
with quite old worker threads, which are more
sensitive to growth.

-gustaf neumann


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to