IPERF TCP vs UDP

iperflayer4macudp

I had to determine UDP performance over multi-hop network , I used MAC Air over gigabit ethernet ( Thunderbolt). As is customary, TCP was tested and the gig over link was saturated ~900mbps, but surprise when I test UDP it got capped off at 650mbps.

Now I connected two nodes (PC's ) directly without switch. Both the nodes indicated they were working at PHY rate 1000mbps

Node A < ——– > Node B

  1. Node A ( MAC Book) Node B ( MAC Air) — UDP throughput was 650 mbps TCP 944

  2. Node A ( MAC Book) Node B ( Win 7) — UDP throughput was 600 mbps TCP 900

Please note I only consider UDP throughput with (0-1% PL), I adjusted the bandwidth from -b {1000,900,650}, I achieve the sweetness of 1% PL at 650. It did not make any sense, how can TCP usurp UDP.

Then from 2nd choice I use UDP with 4 streams the UDP throughput improved to 944mbps.

My question(s) are :-

  1. I understand in TCP the streams will improve tolerance to 2% PL and it will saturate the links with individual stream contributing to saturation. What does iperf UDP streams do? I read the –help but it is not clear.

  2. In case of individual nodes what can I do on my Apple, such that it allocates more UDP buffer (if at all it is a buffer issue). The link is 1Gig , and forget the multihop, even when it has a direct link with the client ( where there is no link sharing , supposedly no reason for dropped packets, or huge latencies, should have been able to over subscribe the link)

enter image description here

Best Answer

What does iperf UDP streams do

iperf will attempt to send UDP packets to reach the rate given in --bandwidth. If that parameter is missing, it will attempt to achieve the rate of the transmitting interface.

what can i do on my Apple

You can measure both computers' resource use, as there's a bottleneck. CPU is the most likely bottleneck, given that parallel transfers have superior performance. See the --single_udp parameter for a easy way to determine single core versus multicore performance.

Note that you've chosen really odd platforms. I've no idea what the per-packet overhead of what the MacBook Air's Thunderbolt-attached gigabit ethernet dongle might be compared with PCIe. So you are going to have to do a lot of the investigation of potential bottlenecks yourself.