Export to GitHub

iperf - issue #106

zero-copy mode for receiver too


Posted on Nov 10, 2013 by Happy Kangaroo

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 Kangaroo

fixed. closing

Comment #2

Posted on Nov 26, 2013 by Happy Bear

Did 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 Kangaroo

I 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 Kangaroo

closed in error. Reopening

Comment #5

Posted on Nov 26, 2013 by Happy Bear

By 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 Kangaroo

Is 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 Kangaroo

NOTE: 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 Dog

Grab this.

Status: New

Labels:
Type-Enhancement Milestone-3.1a1