I am trying to measure the impact my application has on my network. For this to work, I want to run a network test with a public iPerf3 server to see the difference (baseline vs application running).
When I run iperf3 to the nearest public iPerf3 server, my internet is very weird, and a lot of times outputs 0 bytes and a bitrate of 0 bits/sec. The following is an example of running iperf3 to a public iPerf3 server with my host machine (Windows 10).
[ 5] local 192.168.0.148 port 54745 connected to 45.145.167.70 port 10420
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.01 sec 384 KBytes 3.11 Mbits/sec
[ 5] 1.01-2.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 2.00-3.01 sec 0.00 Bytes 0.00 bits/sec
[ 5] 3.01-4.00 sec 128 KBytes 1.06 Mbits/sec
[ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 5.00-6.01 sec 128 KBytes 1.04 Mbits/sec
[ 5] 6.01-7.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 7.00-8.01 sec 0.00 Bytes 0.00 bits/sec
And this is when running from my VM (Ubuntu)
[ 5] local 10.0.2.15 port 44912 connected to 45.145.167.70 port 10420
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 896 KBytes 7.33 Mbits/sec 0 65.6 KBytes
[ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0 62.7 KBytes
[ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 62.7 KBytes
[ 5] 3.00-4.00 sec 384 KBytes 3.14 Mbits/sec 0 62.7 KBytes
[ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 64.2 KBytes
[ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 64.2 KBytes
[ 5] 6.00-7.00 sec 384 KBytes 3.15 Mbits/sec 0 65.6 KBytes
[ 5] 7.00-8.00 sec 256 KBytes 2.10 Mbits/sec 0 72.7 KBytes
[ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 72.7 KBytes
[ 5] 9.00-10.00 sec 256 KBytes 2.10 Mbits/sec 0 75.6 KBytes
I am using a wireless connection with a TP-Link Archer AX1800 router with the 5GHz wifi. The following is my interface information
There is 1 interface on the system:
Name : Wi-Fi 2
Description : Broadcom 802.11ac Network Adapter #2
GUID : 0624521b-a396-4a48-a63a-a10d2f981f1f
Physical address : 04:d9:f5:7a:a7:22
State : connected
SSID : TP-Link_A231_5G
BSSID : 60:83:e7:46:a2:30
Network type : Infrastructure
Radio type : 802.11ac
Authentication : WPA2-Personal
Cipher : CCMP
Connection mode : Profile
Channel : 0
Receive rate (Mbps) : 866.5
Transmit rate (Mbps) : 866.5
Signal : 100%
Profile : TP-Link_A231_5G
Hosted network status : Not available
Running a speedtest with https://fast.com gives a result of 93 Mbps. I have tried running iperf with my host machine (windows 10) and in an Ubuntu VM with bridged adapter, but the results are the same.
1 Answer 1
I assume you are running TCP tests with default message size which is 128KB = 1Mbits. What seems to happen is that the iperf3 client fills the TCP/network buffers with one or few messages. Then, because of the relatively slow network, it takes time until enough data is sent to free buffers. This is probably the reason for the 0 bits/sec in some intervals.
Usually it helps to test relatively slow interfaces with small messages, using the -l option. E.g. -l 1K to send 1KB messages, or the average message size sent by apps that are using the network. Since it is expected that several small messages will be transferred in each interval, then the actual throughput can be determined.