lkml.org 
[lkml]   [1999]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Preparations for ZD's upcoming Apache/Linux benchmark

> Once again, do in kernel space what *makes sense* to do in kernel
> space. In this case, static serving with a policy from user space
> makes pretty good sense to do in kernel space (like knfsd vs unfsd)
> whereas it would be idiotic to do dynamic serving or set policy there.

I think we're far from the case where doing http protocol work in the
kernel makes sense. comparing serving static http to nfs in terms of
reasons to put it in kernel space is comparing apples to oranges. on the
moon. There are a ton of things we can do to scale real http serving.

we have threads+blocking sendfile(). now remember, in the real world you
have 87 gazillion "long term" modem connections sucking data down. they're
going to be sitting around tossing packets out tcp and occasionally
needing more data. blocking sendfile handles this case happily..
threads sit there spewing data into tcp from the page cache..

but this sucks in the universe where its important to fill n 100mb pipes
with unrealistic traffic so you can put your OS on the cover of magazines.
In this world you have churn tons and tons of very quick connections.
the overhead of thread management and scheduling and stuff starts to
stink.

so this is where PHhttpd turns out to be good. I hacked it up to play
with stephen's siginfo patches and just tossed the http stuff around it
because I needed something to generate IO. Oops, insta static http
engine. It caches a set of files with precomputed headers on the front and
spins on sigwaitinfo() for work to do. It goes like smoke, ingo saw it do
3500 connections/second over localhost with a single thread of execution
under 2.3. It avoids the thundering herd problem completely by passing
the siginfo events on listening sockets between the threads. With large
tcp buffers it ends up serving connections in a single go with
accept()/fcntl()/read()/write()/close().

and its entirely useless in the real world. Tell it to do content
encoding, cgi, modules, keepalives, blah blah and it will stare blankly at
you and point out that NT in just the right conditions can spew out tons
of data in labs and uh-oh what will the pointy hairs think.

So I'm all for hacking a better static model into apache that maintains
apache's ultra-configurability. And yes, that is in the works. But I
personally find it exceedingly silly to put http in the kernel at this
point, for the usual avoid-code-in-the-kernel reasons. Run phhttpd along
side apache and do url magic if you so desire (not that its anywhere
ready for prime time, and you need kernel patches for siginfo to work,
etc).

-- zach

[oh, hpa, having written this I realize it might be taken as a flame at
you. Its not at all, this is aimed more at the list in general :) ]

- - - - - -
007 373 5963


-
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:52    [W:0.036 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site