On a test server configured with threadtimeout set to 120, minthreads
not set (defaults to 1/0 I think), and maxthreads set to 40, I have
another server reference a URL every 5 seconds.  What I see on the
test server is:

[17/Oct/2001:19:17:49][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:17:54][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:17:59][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:18:04][9533.8200][-conn0-] Notice: monitor: returning page

Then I go click around on the site to cause another thread to launch to
handle the demand.  Then stop clicking to let things settle down.  Now I
see this:

[17/Oct/2001:19:19:55][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:20:00][9533.14345][-conn1-] Notice: monitor: returning page
[17/Oct/2001:19:20:05][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:20:10][9533.14345][-conn1-] Notice: monitor: returning page
[17/Oct/2001:19:20:15][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:20:20][9533.14345][-conn1-] Notice: monitor: returning page
[17/Oct/2001:19:20:25][9533.8200][-conn0-] Notice: monitor: returning page
[17/Oct/2001:19:20:30][9533.14345][-conn1-] Notice: monitor: returning page

This shows (I think) that if you currently have N threads active, no
threads will timeout if there are N hits in threadtimeout seconds, at
least on a Linux box, because the thread scheduling is FIFO instead of
LIFO.  On one of our production server, we are up to around 26 active
threads.  I don't think there is any value for threadtimeout that would
make threads actually time-out.

I dunno if there is a way to make Linux/pthreads/AS/... wakeup threads
in LIFO order instead of FIFO.  Anyone else know?

Jim

Reply via email to