The difference between iperf2 and iperf3, and the use and introduction

1. Introduction to iperf2

        Iperf2 is a network performance testing tool. Iperf2 can test TCP and UDP bandwidth quality. Iperf2 can measure the maximum TCP bandwidth, with various parameters and UDP characteristics. Iperf2 can report bandwidth, latency jitter and packet loss.

iPerf - iPerf3 and iPerf2 user documentation

Two, iperf and iperf3 comparison

1) Compared with iperf, iperf3 tests UDP packet loss rate and bandwidth. Under the same hardware conditions, iperf3 test bandwidth is higher, but there is serious packet loss.

      The iperf test UDP bandwidth is small, but no packet loss. (x86 hardware platform)
2) iperf 2.05, the client can use the parameter "-d" to perform a duplex test, first test the transmission, the client sends data to the server, and wait until the test time is over (the default is 10s, you can pass the -t option to change), and then test the reception, the client receives the data sent by the server, and finally obtains the sending and receiving throughput. iperf3 does not support duplex testing.

3) For the use of iperf3 and iperf2, the iperf3 server uses the unified command iperf3 -s, and does not distinguish whether to test UDP or TCP;

4) The test is to ensure that the MTU value of the tested network card is greater than the length of the test packet, that is, the value of -l. The default packet size is 1470, plus the length of udp and ip header 28, which is equal to 1498. If the default packet size > MTU, it will appear that the receiving end cannot receive data.

3. iperf mainly affects the parameters of the packet loss rate

-b Use iperf to generate and send data. When the data packet length is fixed (L is 1470 bytes by default), the larger the bandwidth, the more data packets are sent per second. When the link delay is large, the number of data packets sent per second will cause a relatively large packet loss rate.

-l can set the length of the sent packet. The default value of TCP is 8KB, and the default value of UDP is 1470 bytes. Increasing the length of the packet Increasing the length of the buffer can reduce the packet loss rate, because if the packet length is small, the number of packets will be larger, which is more likely to cause congestion.

In the case of sending large packets, the way to ensure no packet loss should be to increase the read and write buffer size of the system at the same time, modify /etc/sysctl.conf

The reason for packet loss in udp mode may be caused by the speed mismatch between the sending end and the receiving end. In addition to analyzing whether the iperf parameter setting ensures that the receiving end can process data in time, you should also look at the status of the sending end device and the receiving end device. For example, a packet loss rate problem that plagued me last week, the sending end has a 32-core computer, and the receiving end has a 24-core computer.
 

Guess you like

Origin blog.csdn.net/hfut_zhanghu/article/details/122980059