Re: Is sendfile all that sexy?

Dan Hollis (goemon@anime.net)
Sun, 14 Jan 2001 17:14:11 -0800 (PST)


On 14 Jan 2001, Linus Torvalds wrote:
> That's not the point of sendfile(). The point of sendfile() is to be
> faster than the _combination_ of:
> addr = mmap(file, ...len...);
> write(fd, addr, len);
> or
> read(file, userdata, len);
> write(fd, userdata, len);

And boy is it ever. It blows both away by more than double.
Not only that the mmap one grinds my box into the ground with swapping,
while the sendfile() case you can't even tell its running except that the
drive is going like mad.

> Does anybody but apache actually use it?

I wonder why samba doesn't use it.

-Dan

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