Much improved sendfile(2) kernel implementation

John Baldwin jhb at freebsd.org
Tue Sep 26 11:30:08 PDT 2006


On Friday 22 September 2006 10:44, Andrew Gallatin wrote:
> 
> Between TSO and your sendfile changes, things are looking up! 
> 
> Here are some Myri10GbE 1500 byte results from a 1.8GHz UP
> FreeBSD/amd64 machine (AMD Athlon(tm) 64 Processor 3000+) sending to a
> 2.0GHz SMP Linux/x86_64 machine (AMD Athlon(tm) 64 X2 Dual Core Processor
> 3800+) running 26.17.7smp and our 1.1.0 Myri10GE driver (with LRO).
> I used a linux receiver because LRO is the only way to receive
> standard frames at line rate (without a TOE).
> 
> These tests are all for sendfile of a 10MB file in /var/tmp: 
> 
>   % 
netperf242 -Hrome-my -tTCP_SENDFILE -F /var//tmp/zot -T,1 -c -C  -- -s393216
> 
> The -T,1 is required to force the netserver to use a different core
> than the interrupt handler is bound to on the linux machine.  BTW,
> it would be really nice if FreeBSD supported CPU affinity for processes
> and interrupt handlers..

You can get some of that with www.freebsd.org/~jhb/patches/intr_bind.patch  
That binds interrupt threads to the CPUs the IDT vector is bound to and adds 
a sysarch() so you can move them around.  I had a simple test program to do 
that but don't have access to it currently.  I've tested this on i386 and 
amd64, but haven't benchmarked it.

-- 
John Baldwin


More information about the freebsd-net mailing list