On Fri, May 05, 2006 at 02:50:52PM -0400, James Carlson wrote:
> Andrew Gallatin writes:
> > It has been a while since I've had a zero-copy FS to play with.  I can
> > tell you that with the 10GbE nic I do drivers for, the CPU overhead
> > drops by 50-60% when you skip the copy on socket writes from userspace
> > (sendfile vs write) on both opteron and T2000.  This translates to
> > more than doubling the single stream bandwidth on anemic CPUs (like a
> > single core on a T2000). 
> 
> Doing zero-copy from user space to kernel means flipping page table
> entries.  When we've looked into this in the recent past, we've[1]
> found that the cost of doing this completely dwarfs the cost of
> copying the data on fairly modern architectures.

Well, not necessarily.  It does mean complications though.

For kernel-land applications (e.g., the NFS server) no page flipping is
needed for ZC -- vectored I/O should suffice.

For user-land applications on the receive side you could use RDMA/RDDP
to get the bits to go to the right places, but that requires RNICs,
which, AFAIK (but I don't track this market closely) are still
imaginary.  The IETF NFSv4 WG is pursuing this approach.

For user-land applications on the send side, if the API is designed for
it, you can get away with ZC on send by having the kernel take ownership
of a user-land app's buffers on writes.

Nico
-- 
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to