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 doesn't work with UDP #1193

Closed
undergroundSimplex opened this issue Aug 24, 2021 · 1 comment
Closed

Zero copy doesn't work with UDP #1193

undergroundSimplex opened this issue Aug 24, 2021 · 1 comment

Comments

@undergroundSimplex
Copy link

undergroundSimplex commented Aug 24, 2021

Context

  • Version of iperf3: 3.10.1

  • Hardware: Intel(R) Atom(TM) Processor E3950 @ 1.60GHz

  • Operating system (and distribution, if any): Debian GNU/Linux 9 (stretch)

Bug Report

  • Expected Behavior
    Zero copy should reduce kernel call to copy_user_enhanced_fast_string.

  • Actual Behavior
    When zero copy is enabled during UDP benchmark. The kernel call copy_user_enhanced_fast_string takes up 51% of cpu time when perf record -g -e cpu-clock is used to benchmark.
    However, when TCP is used, cpu time of copy_user_enhanced_fast_string is significantly reduced as expected.

  • Steps to Reproduce
    iperf3 -s
    sudo perf record -g -e cpu-clock iperf3 -c 127.0.0.1 -Z -u -b 30g -l 64000
    sudo perf report --call-graph --no-children

  • Possible Solution

@davidBar-On
Copy link
Contributor

iperf3 is supporting zero-copy for TCP using sendfile(). It seems that it is not supported for UDP. See https://stackoverflow.com/questions/7450001/is-zero-copy-udp-packing-receiving-possibly-on-linux.

Comment 3 in the above suggests using sendmmsg/recvmmsg for UDP. There is already an open PR #1034 with a suggested enhancement to add sendmmsg/recvmmsg support to iperf3.

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