We have -Z for the sender. We should have it for the receiver too.
There is some nice sample code here:
http://blog.superpat.com/2010/06/01/zero-copy-in-linux-with-sendfile-and-splice/
Comment #1
Posted on Nov 26, 2013 by Happy Kangaroofixed. closing
Comment #2
Posted on Nov 26, 2013 by Happy BearDid we fix this? I don't think so. We do have some receiver-side performance improvements, but not involving splice().
Comment #3
Posted on Nov 26, 2013 by Happy KangarooI assumed that was the fix you committed today, since the CPU went down some much.
(OK, I should have actually looked at the change log! )
So I guess not. I'll reopen it.
Comment #4
Posted on Nov 26, 2013 by Happy Kangarooclosed in error. Reopening
Comment #5
Posted on Nov 26, 2013 by Happy BearBy the way, splice() is not a guaranteed win because it takes two splice() calls to replace the previous single read() call. No bytes get moved but still, extra syscall. Have to benchmark it carefully.
Comment #6
Posted on Nov 27, 2013 by Grumpy KangarooIs it not possible to increase server receive performance by:
- only reading the first few bytes from the socket (ie containing the per packet iperf proto info) & 'skipping' the rest by advancing the fd read pointer ...reduces CPU & memory resources especially for large packets
&
- repeated reads of the socket to clear any back-log of received packets before running the timer/scheduler routine; helps especially for small packet test cases.
&
- provide some instructions on how the user can increase the amount of buffering available to the kernel/NIC card driver (means the CPU can be away from iperf receive for longer before drops due to no buffering occur).
Comment #7
Posted on Nov 28, 2013 by Grumpy KangarooNOTE: profiling the server code with 'perf' indicates ~25 - 30% of the cycles are spent in memcpy; next highest item is @ ~5% (some piece of kernel code, not specific iperf code).
Comment #8
Posted on Jan 8, 2014 by Happy DogGrab this.
Status: New
Labels:
Type-Enhancement
Milestone-3.1a1