On Fri, 8 Jun 2001, Cliff Woolley wrote:
> On Fri, 8 Jun 2001, Geoff Thorpe wrote:
>
> > (If there's Apache developers listening, this is also why threading in 2.0 won't
> > solve the problems of 1.3, it'll just scale them back a bit - threads aren't
> > free, they're just a small linear factor cheaper than processes - please support
> > non-blocking I/O too, please!).
>
> This has been discussed on new-httpd in the past. But this is not a
> simple prospect... it would require some pretty major changes.
> Nevertheless, several developers have expressed an interest in giving it a
> shot in future versions of Apache (though NOT 2.0)...
For the immediate future at least, a process/thread module (I forget the acroynm
that was coined in Apache2 for such things, MTM or something like that?) that
uses GNU Pth would I guess achieve some of what's required. GNU Pth, IIRC, fakes
threads by replacing basically all "interruptable" system calls with Pth
equivalents so that processing can shift between contexts (eg. selects, reads,
writes, sleeps, etc etc all hook back to the Pth scheduler). In this way, only
one thread/process is actually in use, but code written to *think* it's running
in multiple threads can (be made to) work in this scanario too. It'd still be
bulkier than application code designed to work in a non-blocking manner, but
probably less bulky than using distinct real (kernel) threads per-connection. Do
you think Apache could be coerced to slot into such a model?
Of course, the follow up question is then; could you run "fake" (GNU Pth)
threads inside a single real (kernel) thread, and have multiple kernel threads
running in each process, and of course run multiple processes. That'd be one
hell of a hybrid. Then of course, we could ask if some IPC mechanism exists so
certain processes could serve specific types of requests and be folded down to
different user privileges than other processes (eg. to put volatile/leaky
serving inside different processes with only a few threads each, and to put
stable/lightweight serving in other processes with a lot of threads).
So, has someone started an Apache 5.0 branch yet? :-)
Cheers,
Geoff
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]