[netperf-talk] zero-copy sendfile for Solaris

Andrew Gallatin gallatin at cs.duke.edu
Wed May 24 08:13:52 PDT 2006


On Solaris, you need to jump through some ugly flaming hoops to get a
zero-copy sendfile.  To get sendfile to be zero copy took looking at
the kernel source, and running some dtrace scripts to verify that
snf_segmap was being used rather than uiomove.

The easiest way I've found to enable zero-copy sendfile on Solaris is

1) compile with largefile options
2) use sendfilev() rather than sendfile, so
   that I can set SFV_NOWAIT
3) use a really big (16MB or larger) file

The attached patch does all this, plus it enables sendfile
to be used at all on Solaris by adding a check for the
sendfile library so configure does not think Solaris 
is missing a sendfile routine.


Drew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: solaris_sendfile.diff
Type: application/octet-stream
Size: 2641 bytes
Desc: zero-copy sendfile on Solaris
Url : http://www.netperf.org/pipermail/netperf-talk/attachments/20060524/64fbba4b/solaris_sendfile.obj


More information about the netperf-talk mailing list