Considerations and conclusions of Iperf network throughput/bandwidth testing

Considerations and conclusions of Iperf network throughput/bandwidth testing

Iperf test: Use udp to set the bandwidth to 2M, 5M, and 10M, and observe the impact on the ongoing ping test. This proves that when iperf uses udp to test/use a certain or maximum bandwidth, it can also affect the traffic of the tcp protocol.

[[273696]]

Task

(1) (Using UDP, parameters -u -b 2M) Setting different bandwidths

  1. # iperf3 -c 192.168.199.18 -p54321 -i 1 -t 1800 -u -b 1M

(2) Simultaneous testing in both directions (open an additional iperf port/process on either end, and then use the -R parameter to test on the same end)

Server execution:

  1. # iperf3 -s -p54321
  2. # iperf3 -s -p54322

Client execution:

  1. # iperf3 -c 192.168.199.18 -p54321 -i 1 -t 1800 -u -b 1M
  2. # iperf3 -c 192.168.199.18 -p54322 -i 1 -t 1800 -u -b 1M -R

Precautions

The TCP protocol test cannot calculate the delay and packet loss rate, and cannot specify the sending bandwidth.

(1) Iperf main functions:

Iperf can be used to test the performance of TCP or UDP connections between network nodes (including loopbacks), including testing bandwidth, jitter, and packet loss rate. Jitter and packet loss rate are suitable for UDP testing, while bandwidth testing is suitable for TCP and UDP.

(2) Bidirectional simultaneous testing method: Open an additional iperf port/process on either end (note that the ports are different), and then use the -R parameter to test on the other end

For example:

Execute on test machine A (server): (Windows requires opening an additional cmd window)

  1. # iperf3 -s -p23451
  2. # iperf3 -s -p50000

Execute on test machine B (client):

  1. # iperf3 -c 192.168.0.11 -p23451 -i 1 -t 3600 -u -b 1M
  2. # iperf3 -c 192.168.0.11 -p50000 -i 1 -t 3600 -u -b 1M -R

(3) Jitter is the average value of the delay difference between consecutive transmissions.

(4) Loopback test whether iperf is installed successfully

  1. # iperf3 -s
  2. ------------------------------------------------------------------
  3. Server listening on 5201
  4. ------------------------------------------------------------------
  5. # iperf3 -c 127.0.0.1
  6. Connecting to host 127.0.0.1, port 5201
  7. [4] local 127.0.0.1 port 58884 connected to 127.0.0.1 port 5201
  8. [ID] Interval Transfer Bandwidth Retr Cwnd
  9. [4] 0.00-1.00 sec 705 MBytes 5.92 Gbits/sec 0 560 KBytes
  10. …..

(5) Test throughput, jitter and packet loss rate

If you need to test all three parameters at the same time, you can only get them through UDP. Use the -u parameter to test UDP (iperf defaults to TCP).

At the end of the test the server will give a report.

To obtain bandwidth data, you need to continuously increase the bandwidth value on the client side until slight packet loss occurs on the server side. At this time, the bandwidth displayed on the server side is the throughput of the system under test.

(6) Generally speaking, we need to specify the packet length when doing performance testing. Different packet lengths will result in different throughputs, which can be specified using -l, while -b is used to specify the bandwidth.

(7) Issues to note when using TCP to test bandwidth

Sometimes, we need to use TCP to test network bandwidth. There is one parameter that needs special attention, that is the TCP window size, which can be specified using the -w parameter.

The capacity of the network channel = bandwidth * round-trip time

The size of the theoretical TCP window is the capacity of the network channel.

For example, if the network bandwidth is 40Mbit/s and the loop path time is 2ms, then the TCP window size should be no less than 40Mbit/s×2ms = 80kbit = 10Kbytes.

At this point we can query the default TCP window size of iperf to decide whether this parameter needs to be set. In this example, the window size should be designed to be larger than 10Kbytes. Of course, this is only a theoretical value and may need to be adjusted in actual testing.

<<:  There are four misunderstandings about network intelligence

>>:  Where is the entrance to 5G message service? You may not think of it

Recommend

The Heart of Smart Devices: Understanding Semiconductor Sensors

At the heart of smart devices lies a complex worl...

10gbiz: Hong Kong CN2 GIA/Los Angeles CN2 GIA line VPS 60% off $2.75/month

10gbiz has released a current promotion, with 40%...

The future of wide area networks (WANs) is wireless

Cellular wireless networks are an attractive alte...

Communication protocol I2C subsystem Debug

There are two common I2C errors: I2C ACK error, I...

Network Address Translation Protocol (NAT) and Its Application Examples

1. The meaning of NAT When some hosts within a pr...

CrownCloud: Los Angeles AMD Ryzen KVM special price starts at $30 per year

In April this year, CrownCloud launched the AMD R...

Network configuration auditing is more important than ever

To get the most intuitive understanding of how en...

Game changers for the branch office: Wi-Fi 6, 4G, 5G and SD-WAN

Today, the use of cloud computing services contin...

How should the system's facade API gateway be designed?

As the popularity of his e-commerce website grew,...