Re: Fast network file copy; "recvfile()" ?

From: Jan Engelhardt
Date: Thu Jan 17 2008 - 17:52:01 EST



On Jan 17 2008 12:53, Patrick J. LoPresti wrote:

>Using 10GigE cards and the usual tweaks to tcp_rmem etc., I am
>getting single-stream TCP throughput better than 600 MB/sec.

Hm, be aware not to hit the sequence wrap :)

>1) O_DIRECT read() + send()
>2) mmap() + madvise(WILLNEED) + send()
>3) fadvise(WILLNEED) + sendfile()
>
>I am leaning towards (3), since I gather that sendfile() is supposed
>to be pretty fast.
>
>My question is what to do on the receiving end. In short, if I want
>the equivalent of a "recvfile()" to go with sendfile(), what is my
>best bet on Linux?

splice() I think.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/