[netperf-talk] Re: UDP sendfile()

Rick Jones rick.jones2 at hp.com
Tue Feb 27 10:27:23 PST 2007


Ming Liu wrote:
> Dear Rick and all,
> I know that when I measure the network performance, if I use -t 
> TCP_SENDFILE option, the linux sendfile() character will be used to save 
> the copying time from kernel space to use space and send packets into 
> the network.
> My question is, is there a corresponding feature which could save the 
> copying work for UDP transfer? In fact, I have more interest on UDP 
> throughput.
> 
> Thanks for your telling.

I am not aware of support for UDP in sendfile() on various platforms.  A
UDP-based sendfile() is complicated by the lack of flow-control in UDP,
which would mean a UDP-based sendfile() would have to provide some sort
of rate-control.

The general goodness of avoiding IP fragmentation means that plain UDP
sends from user space should be < MTU, and often as not, the cross-over
point in terms of service demand between send() and sendfile() is > MTU,
so having an application pace its sendfiles() likely wouldn't be an
overall win.

That being the case, if someone knows of a stack or two with support for
a sendfile()-like call over UDP I'd be happy to entertain patches to
netperf to include it.

happy benchmarking,

rick jones


More information about the netperf-talk mailing list