Re: zero-copy TCP fileserving

Gregory Maxwell (linker@z.ml.org)
Thu, 3 Jun 1999 12:58:43 -0400 (EDT)


On Thu, 3 Jun 1999, Zach Brown wrote:

> On Thu, 3 Jun 1999, Bjorn Wesen wrote:
> > Exactly - the server mmap()'s the file but never actually accesses any
> > data. The socket write buffer addresses are translated by the kernel and
> > the needed pages are read in (if not already in mem) subsequently and
> > locked as the sending progresses, but all that is done in the kernels MMU
> > context so there shouldn't be any need to access the original process
> > context.
>
> why screw with any of that? sendfile() is quite good at this.
>
> > Since the process sleeps while doing the write(), it cannot munmap or do
> > nasty things to the mapping I guess. But the above is probably more
> > complicated than it sounds :)
>
> indeed it is, as davem mentioned. think about retransmits, threads, etc.
>
> this all has been discussed (most recently at the expo ;)), work is in
> progress..

This brings up an intresting point: Why does nobody to more intresting
benchmarks like measuring the throughtput of a nonchanging static-web load
and graph for varrying levels of packet loss?

Or measure data transfered vs traffic on the wire (esp useful for CGI)?

Both of these are much more intresting then OS-A does X requests/sec while
OS-B does Y requests/sec on a crazy hardware config, where X & Y are
well beyond what 99.999998% of the market needs on a single server.

-
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/