Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero copy for sending and receiving #1286

Open
skoehler opened this issue Mar 1, 2022 · 1 comment
Open

Zero copy for sending and receiving #1286

skoehler opened this issue Mar 1, 2022 · 1 comment

Comments

@skoehler
Copy link

skoehler commented Mar 1, 2022

Context

  • Version of iperf3: d2a2252

  • Hardware: Dell XPS 15

  • Operating system (and distribution, if any): Ubuntu 18.04 with latest updates

  • Other relevant information (for example, non-default compilers,
    libraries, cross-compiling, etc.):

Enhancement Request

  • Current behavior

Currently, --zerocopy is only listed as a client option and the documentation states, that zerocopy is only used for sending data. I don't follow. For UDP we have recvmmsg and sendmmsg. So clearly, zero copy APIs exist both for sending and receiving data. Why would iperf3 not use zero copy for receiving data? It will likely reduce CPU load and package drops on the receiver side.

Also --reverse swaps the roles of client and server. Now the server is sending. Is the --zerocopy option forwarded to the server in such a case?

  • Desired behavior

Have an option to enable zero copy for sending and receiving. It could also be separate options. If these options remain client options, maybe be clearer about whether these options are forwarded to the server. If the options are not forwarded to the server, then it should be possible to set zerocopy for the server as well.

  • Implementation notes

n/a

@davidBar-On
Copy link
Contributor

Is the --zerocopy option forwarded to the server

--zerocopy option is forwarded to the server- see PR #1204.

For UDP we have recvmmsg and sendmmsg. So clearly, zero copy APIs exist both for sending and receiving data.

Adding UDP support using sendmmsg is available in PR #1034. As noted in this PR, using recvmmsg doesn't seem to help and it may even reduce the throughput.

For TCP, sendfile is used for zero copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants