On Mon, Jun 02, 2003 at 05:48:22AM -0500, Nigel Hamilton wrote: > > I suspect i get called heretical for this, but I actually prefer to use > > threads when it comes to these things. > > a) better memory efficiency > > b) easier and more advanced control over queueing and message handling > > c) added bonus for you - no more reaping! :) > > a + b + c = sounds great.
I'm not sure how big a win threads would be in this instance, if any. Most threading libraries are fork()-based anyway - Linux doesn't have 'threads' natively, but a very fast fork() implementation. (Solaris does have threads I believe, not sure about the BSDs). Scalability of pre-forking servers isn't something I'm really up on, but one thing I can think of would be the amount of shared information - if there are big shared data structures, and they are written to, then you're going to get some biggish copy-on-write bursts. vmstat might give some good clues as to where the pressure it - it does sound like memory pressure from the description, though. Cheers, Alex.