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

How wireless mesh networking technology can power smart buildings

Smart buildings are becoming increasingly importa...

A brief discussion on the integrated development of data centers

In the tide of information and communication tech...

Industry hot spots of data center in 2018

For many people, 2017 has been an intense and bus...

Design and implementation of Nodejs-Ipc

[[347927]] This article is reprinted from the WeC...

DiyVM: 50 yuan/month-2GB/50GB/5M/Hong Kong CN2 line

DiyVM is a brand of Hong Kong Ruiou International...

Comprehensive understanding of TCP/IP knowledge system structure summary

1. TCP Knowledge System We analyze the TCP knowle...

How to reduce the incidence of human error in data centers

Data center companies often encounter hardware an...