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

iperf3 server udp mode showing 0.0 for everthing #905

Closed
mojtaba-eshghie opened this issue Jul 31, 2019 · 10 comments
Closed

iperf3 server udp mode showing 0.0 for everthing #905

mojtaba-eshghie opened this issue Jul 31, 2019 · 10 comments

Comments

@mojtaba-eshghie
Copy link

I am trying to measure the maximum throughput with iperf3. In UDP mode, the server shows this:


[  5] local db03::2 port 5201 connected to db00::2 port 48470
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
[  5]  10.00-10.04  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (-nan%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  5]   0.00-10.04  sec  1.24 MBytes  1.04 Mbits/sec  0.000 ms  0/0 (-nan%)

However the client shows this:

Connecting to host db03::2, port 5201
[  4] local db00::2 port 48470 connected to db03::2 port 5201
[ ID] Interval           Transfer     Bandwidth       Total Datagrams
[  4]   0.00-1.00   sec   120 KBytes   983 Kbits/sec  15
[  4]   1.00-2.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   2.00-3.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   3.00-4.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   4.00-5.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   5.00-6.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   6.00-7.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   7.00-8.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   8.00-9.00   sec   128 KBytes  1.05 Mbits/sec  16
[  4]   9.00-10.00  sec   128 KBytes  1.05 Mbits/sec  16
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  4]   0.00-10.00  sec  1.24 MBytes  1.04 Mbits/sec  0.000 ms  0/0 (-nan%)
[  4] Sent 0 datagrams

iperf Done.

The command that I issued on the server is:
iperf3 -B db03::2 -s -6
And the command that I issued on the client is:
iperf3 -c db03::2 -6 -u

This is the result of iperf3 --version:

iperf 3.0.11
Linux ubuntu 4.4.0-157-generic #185-Ubuntu SMP Tue Jul 23 09:17:01 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
@mojtaba-eshghie mojtaba-eshghie changed the title iperf3 server udp mode showing 0.0 on everything iperf3 server udp mode showing 0.0 for everthing Jul 31, 2019
@FuzzyStatic
Copy link
Contributor

@mojtaba-eshghie You are using a really old version of iperf3. The latest version is 3.7.

Can upgrade to the latest version and try again.

@mojtaba-eshghie
Copy link
Author

This is also tested using the following version of iperf3, still the exact same situtation:
iperf 3.7 (cJSON 1.5.2)

@bmah888
Copy link
Contributor

bmah888 commented Aug 8, 2019

So your client is sending data to the server, but it looks like none of the packets are getting through. The control connection seemed to have worked however. I wonder if you have some sort of firewall or packet filter blocking UDP traffic between yoru hosts. What if you try a TCP test, does that work as expected?

@tmursch
Copy link

tmursch commented Nov 5, 2019

I have the same issue. Tried multiple OS servers with latest version of iperf3 with same result from multiple clients using Windows or Linux. There is no local firewall at either end filtering UDP traffic. The TCP test works as expected. Is this a known issue with iperf3?

-----------------------------------------------------------
Server listening on 5200
-----------------------------------------------------------
Accepted connection from [redacted], port 41644
[  6] local [redacted]  port 5200 connected to [redacted] port 36189
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  6]   0.00-1.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]  10.00-11.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]  11.00-12.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]  12.00-13.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]  13.00-14.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]  14.00-15.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
[  6]  15.00-15.11  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  6]   0.00-15.11  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)  receiver

@bmah888
Copy link
Contributor

bmah888 commented Nov 8, 2019

There are no well-known issues with UDP tests, at least of this level of breakage, in any version of iperf3.

I just ran this test with a MacOS client, FreeBSD server:

Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.56.1, port 55011
[  5] local 192.168.56.102 port 5201 connected to 192.168.56.1 port 62612
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec   129 KBytes  1.05 Mbits/sec  37140.469 ms  0/91 (0%)
[  5]   1.00-2.00   sec   127 KBytes  1.04 Mbits/sec  111.658 ms  0/90 (0%)
[  5]   2.00-3.00   sec   129 KBytes  1.05 Mbits/sec  0.494 ms  0/91 (0%)
[  5]   3.00-4.00   sec   127 KBytes  1.04 Mbits/sec  0.214 ms  0/90 (0%)
[  5]   4.00-5.00   sec   129 KBytes  1.06 Mbits/sec  0.171 ms  0/91 (0%)
[  5]   5.00-6.00   sec   127 KBytes  1.04 Mbits/sec  0.193 ms  0/90 (0%)
[  5]   6.00-7.00   sec   129 KBytes  1.05 Mbits/sec  0.190 ms  0/91 (0%)
[  5]   7.00-8.00   sec   127 KBytes  1.04 Mbits/sec  0.188 ms  0/90 (0%)
[  5]   8.00-9.00   sec   129 KBytes  1.05 Mbits/sec  0.121 ms  0/91 (0%)
[  5]   9.00-10.00  sec   127 KBytes  1.04 Mbits/sec  0.184 ms  0/90 (0%)
[  5]  10.00-10.00  sec  1.41 KBytes  2.77 Mbits/sec  0.203 ms  0/1 (0%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.00  sec  1.25 MBytes  1.05 Mbits/sec  0.203 ms  0/906 (0%)  receiver

For those of you having this problem, do you know how to use tcpdump to examine the packets arriving on the server? That would at least help narrow down where the problem is, or isn't. I really don't think this is an iperf3 bug, since I can't recreate this problem and if we had such a critical flaw. I'd have received a flood of bug reports by now.

@nnaukwal
Copy link

nnaukwal commented Jan 9, 2020

I am using an older version of iperf3 (iperf 3.1.3), and I can reproduce the issue for when there is IP fragmentation between Client / Server.

In Iperf version 3.1.3, it seems the default UDP datagram size is set to 8192 bytes, which causes IP packet to fragment in my env.

For those seeing the behaviour could you tweak the UDP datagram length, on the client, to a smaller value ( with the --length option, with whatever value suits your env) for verification - My results below:

Repro (with default length):
Setup:
Server:
iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Client:
iperf3 -u -b 100M  -c 10.6.2.41   << Default UDP length
Result:
Server:
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.4.2.38, port 58166
[  5] local 10.6.2.41 port 5201 connected to 10.4.2.38 port 46850
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec  64.0 KBytes   524 Kbits/sec  2.111 ms  11/19 (58%)  
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)     <<<<
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
[  5]  10.00-10.11  sec  0.00 Bytes  0.00 bits/sec  2.111 ms  0/0 (0%)  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  5]   0.00-10.11  sec  0.00 Bytes  0.00 bits/sec  2.111 ms  11/19 (58%)  

Using tcpdump have verified that the server does see the UDP datagrams even when iperf reports 0.0Bytes (Although the IP packets are fragmented, they do reach the server).

Repro (with length set to 1200 bytes)
Setup:
Server:
iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Client:
iperf3 -u -b 100M  -c 10.6.2.41   --length 1200 << Data length to 1200 bytes
Result:
Server:
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.4.2.38, port 58232
[  5] local 10.6.2.41 port 5201 connected to 10.4.2.38 port 37091
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec  9.49 MBytes  79.6 Mbits/sec  0.046 ms  105/8394 (1.3%)  
[  5]   1.00-2.00   sec  11.9 MBytes  99.5 Mbits/sec  0.046 ms  51/10410 (0.49%)  
[  5]   2.00-3.00   sec  11.9 MBytes  99.4 Mbits/sec  0.048 ms  51/10408 (0.49%)  
[  5]   3.00-4.00   sec  11.9 MBytes  99.5 Mbits/sec  0.047 ms  53/10415 (0.51%)  
[  5]   4.00-5.00   sec  11.9 MBytes  99.5 Mbits/sec  0.049 ms  55/10417 (0.53%)  
[  5]   5.00-6.00   sec  11.9 MBytes  99.6 Mbits/sec  0.046 ms  73/10448 (0.7%)  
[  5]   6.00-7.00   sec  11.9 MBytes  99.5 Mbits/sec  0.044 ms  53/10417 (0.51%)  
[  5]   7.00-8.00   sec  11.9 MBytes  99.5 Mbits/sec  0.045 ms  50/10418 (0.48%)  
[  5]   8.00-9.00   sec  11.9 MBytes  99.5 Mbits/sec  0.044 ms  50/10414 (0.48%)  
[  5]   9.00-10.00  sec  11.9 MBytes  99.5 Mbits/sec  0.043 ms  49/10418 (0.47%)  
[  5]  10.00-10.11  sec  1.19 MBytes  88.0 Mbits/sec  0.045 ms  3/1039 (0.29%)  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Jitter    Lost/Total Datagrams
[  5]   0.00-10.11  sec  0.00 Bytes  0.00 bits/sec  0.045 ms  593/103198 (0.57%)  

@bmah888
Copy link
Contributor

bmah888 commented Apr 16, 2020

@nnaukwal You're quite right about fragmentation and the default IP send size in older versions of iperf3. That's why we changed the default starting in iperf-3.1.5, although as you correctly pointed out the UDP payload size can be changed with the --length command-line option to the client. There were also some reporting issues related to UDP tests that were fixed in iperf-3.2. This is why we generally recommend that users run the latest version of iperf3.

I'm starting to think there isn't much more we can do with this issue. I suppose if this were my setup I'd do packet captures on the server side (as I recommended earlier) and try varying the --length parameter to see if there are any MTU issues. Also try doing TCP tests to see if those work, and also double-check for some sort of packet filtering.

@GF-Huang
Copy link

Why the official site still show me the 3.1.3 at 2022? I thought it is the latest version.

image

@bmah888
Copy link
Contributor

bmah888 commented May 16, 2022

@GF-Huang : That's not the official iperf3 site. The official iperf3 Web site is https://software.es.net/iperf and we have never made binaries available any platform, only source code. A question such as this probably be asked in the Discussions...this is a issue that's been closed for two years.

@davidBar-On
Copy link
Contributor

Windows executables of the latest iperf3 versions are maintained here by BudMan (I don't know who he is).

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

7 participants