Re: Thread implementations...

Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Fri, 26 Jun 1998 01:32:47 -0700 (PDT)


On Fri, 26 Jun 1998, Chris Wedgwood wrote:

> sendfile is most useful when you can append or prepend data constructed from
> an iovec.

Ingo told me a while back I should stop trying to combine syscalls...
'cause sysenter/exit would really help the cpl 0<>3 transitions. Right
now I'm tending to believe him... writev+sendfile may not be necessary.

Here's the rub though: HTTP response headers are typically on the order
250 bytes. The networking layer has to be smart enough to not send a 250
byte packet inbetween the writev() for the headers, and the sendfile() for
the data. Other protocols have trailers... they're not so important in
HTTP.

> In the case of web servers and proxy caches, I don't think close on send is
> worth while, because it defeats the purpose and the (possibly very great)
> win experienced with HTTP/1.1.

Yeah, close on send isn't interesting for HTTP. Due to various subtleties
closing an HTTP connection reliably isn't just as easy as close().

pipelining is cool, but of little benefit to end users in practice. MUX
is what people really need... so that the browser can get the metadata for
all images and lay out the page in minimal time, and then progressive
png/jpg can be used to successively improve the entire page -- all the
data multiplexed over a single TCP connection. This gives the user the
opportunity to click a link early on, before loading completes.

This is why current browsers use multiple TCP connections... they're
simulating MUX.

But... MUX sucks for servers. For the user to get the best perceived
results from MUX on a 28.8 modem, (insert back of envelope calculation)
I'm guessing the fragments will be around 500 bytes. That is, send 500
bytes of one image, 500 bytes of another, and so on. The complexity to do
this in the kernel goes well beyond what we're talking about here. There's
all sorts of headers and trailers and things that go in between the
fragments.

MUX comes with HTTP/ng, there's some documents at www.w3c.org.

Dean

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu