lkml.org 
[lkml]   [1999]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linus on Linux, Apache and Threads
> Apache should not use a seperate process for each HTTP request.

It doesn't. It uses a separate process for each simulatenous request,
but each of these processes in their lifetime may server many
requests.


> It ought to one of two things:
>
> - Use a thread to handle each request, all in one process.

No, that would be insane. Perhaps use threads the way it now uses
processes, but not one thread per request -- that would be death as
far as performance goes.

> - Be event-driven rather than procedure-driven by using
> select(2) to serve files. (Obviously CGI scripts and anything
> hard to do in an event-driven manner can be done with a
> new spawned/forked process.)

Maybe... but there are still probably better ways of doing this at
the extreme high end anyhow (oh, and poll would probably be preferred
for gobs of FDs).

> Note that on *.BSD, Apache's process-intensiveness is not an
> issue because *.BSD kernels can fork at a mind-boggling rate.

*BSD kernels can fork at a very high rate, as can linux, but neither
of them need to fork all that fast for reasons I've already outlined.



-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.222 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site