httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tani Hosokawa <unkn...@riverstyx.net>
Subject Re: some questions about threaded apache
Date Mon, 21 Jun 1999 11:58:30 GMT
On Mon, 21 Jun 1999, Ryan Bloom wrote:

> In the current implementation, threads don't die on their own.  The only
> time we spawn new threads, or kill old ones, is when a whole new process
> is created, or a whole procesw goes away.  This may change in the future,
> but spawning and killing threads is something that most pthread libraries
> don't do well.

Hmm.  Is there any way you could keep new thread creation to one process
until it's full, instead of just randomly selecting one?  I assume that
behaviour is because there are several processes waiting on a socket and
the kernel hands it off to one of them at random, but if you could have
just one thread waiting, then passing it off, it'd be handy... otherwise,
idle processes will never be culled.  I'd like to get that extra memory
back sometime to use for disk caching, etc, since at peak times the server
gets up to around 1300 active threads and at low time it gets down to 400
:)

> The 0 idle servers may be due to how we are computing the number of idle
> servers.  Currently, it is based on the total number of threads in the
> server.  
> 
> And it's REALLY good to know the threaded Apache is able to handle a real
> world load better than the process based one. :)

Well, according to server-status right now, there are 911 requests being
processed, and ps reports that there are 953 httpd-apr processes running.
That's listing the main parent, 20 children, and that other thread that
doesn't actually process requests, so 912 threads.  I'm guessing that
extra one is just because it got spawned while I was switching windows.
I'd assume that would mean there really are only 0 available threads.  The
scoreboard doesn't show any threads that are just waiting for connections:

967 connections currently being processed, 0 idle servers 

KKKKKKLWKKWKKWWWKKKWWKKKKKKWKWKKWKKKWWWKWKKWKKKWKKKWKKWKKWKKKKKK
...................................................W......K.....
KKKWKWKKKLKKKKLKKLKKKKKKKKKKWKWKKKKKWKKKWKKKKKKKKWKKKKWKKWKKWKRK
KKWKKKKLKKKKWKKKKKKWWKKKWKKKKKWKWWWKKKKKKKKKKKKWWWWKKKKKKKKWKKKK
KKKKKKKKKWKWKWKWKKKLKWWKKKKWKKKWKKWKKKKKKKKKKKWKKKKKKKKKKWKKKKKK
KKKKWKWKKKKKWKKKWKKKKKKKWWWKKKKKKKKKKWKKKKWKWKKKKWKKKKWKKKKKKWKW
WKKKKKKWKKKKWKWKKKKKWKWWKKWKWKKWKKKWKKWWKKKKKKKRKKKWKKKKKKKKKKKK
WKWKKWKKKLKKKKKKKKWKKKWKWKKKKKKKWWKKWKKKKKKKKKKKKWWKWKKWKWWKWWKK
...................W......W.....................................
KKKWWKWKWKKWKKKKWKKKWKWKWKKKKKKKKKKKKWWKKKWWRKKKWKWKKKKRKKKKKKKK
KKKWKWKKKWWKKWWKKWLKWKWKKKKWWWWKKKKKKKKLKKKKWKKKKWWKWKWKKKKWKKWK
KKKKKKKKKKKKKKWWKWWKKKWKKKKWWKKKWWKKKKKKKKKKKKKWKKKWKKKWKKKKKWKW
...........................W....................................
KWKKWKKKKKKKWWKWKKWKKKKKWWWWWWKLKKKKKKWKKKKKKKKKKKKLKKKKKKKKKWKW
KKKKKWWKWKLWWWKWWKKWKKKWKKKKKKKKWWWKKKKKKKKKWKKKKKWKKKKKWKLWWKKK
.....W..........................................................
KKKWKKWWKKWKKKWKKKKKKKWWWKKLWKWWWWKKKKKKKWWKKKKKKKKKKWWWWKKKKKKK
KKKKKWKWKKKWKKKWKKKKWKKKKKWWKKKKWKKKKKWKKKKKWWKKKKKKKKKKKKKWKKKK
............W...................................................
KKKKKKKKKKKLWKKWKKKKWKKKKKKWKKKKWWWKWKKKKWKWKKKWLKWKKWWKKWKKKKKW
................................................................
................................................................
................................................................
................................................................

So that means every connection from here on in is going to require a
spawning of a thread (which appears to take a fair bit of time sometimes).
Any suggestions on what I might do about this?  There are a couple
processes kicking about there that only have one or two threads in them,
but something's gone awry here, I think.

---
tani hosokawa
river styx internet



Mime
View raw message