Use netperf and iperf3 to test network performance between ECSs. The test operations include preparations, TCP bandwidth test, UDP PPS test, and latency test.
Parameter |
Description |
---|---|
-p |
Port number |
-H |
IP address of the RX end |
-t |
Protocol used in packet transmitting, the value of which is TCP_STREAM in bandwidth tests |
-l |
Test duration |
-m |
Data packet size, which is suggested to be 1440 in bandwidth tests |
Parameter |
Description |
---|---|
-p |
Port number |
-c |
IP address of the RX end |
-u |
UDP packets |
-b |
TX bandwidth |
-t |
Test duration |
-l |
Data packet size, which is suggested to be 16 in PPS tests |
-A |
ID of the vCPU used by iperf3 In this section, the maximum number of 16 vCPUs is used as an example for each ECS. If an ECS has 8 vCPUs, the -A value ranges from 0 to 7. |
Category |
Quantity |
Image |
Specifications |
IP Address |
---|---|---|---|---|
Tested ECS |
1 |
CentOS 7.4 64bit (recommended) |
At least eight vCPUs |
192.168.2.10 |
Auxiliary ECS |
8 |
CentOS 7.4 64bit (recommended) |
At least 8 vCPUs |
192.168.2.11-192.168.2.18 |
Table 4 lists the procedures for installing these tools.
Perform the following operations on both tested ECS and auxiliary ECSs.
ethtool -l eth0 | grep -i Pre -A 5 | grep Combined
In the preceding command, X is the number of queues obtained in 3.a.
Perform the test on multiple flows. This section considers 16 flows that are evenly distributed to eight ECSs, as an example.
netserver -p 12001
netserver -p 12002
In the preceding commands, -p specifies the listening port.
##The IP address is for the first auxiliary ECS.
netperf -H 192.168.2.11 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.11 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the second auxiliary ECS.
netperf -H 192.168.2.12 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.12 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the third auxiliary ECS.
netperf -H 192.168.2.13 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.13 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the fourth auxiliary ECS.
netperf -H 192.168.2.14 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.14 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the fifth auxiliary ECS.
netperf -H 192.168.2.15 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.15 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the sixth auxiliary ECS.
netperf -H 192.168.2.16 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.16 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the seventh auxiliary ECS.
netperf -H 192.168.2.17 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.17 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The IP address is for the eighth auxiliary ECS.
netperf -H 192.168.2.18 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.18 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
##The port number is for the first auxiliary ECS.
netserver -p 12001
netserver -p 12002
##The port number is for the second auxiliary ECS.
netserver -p 12003
netserver -p 12004
##The port number is for the third auxiliary ECS.
netserver -p 12005
netserver -p 12006
##The port number is for the fourth auxiliary ECS.
netserver -p 12007
netserver -p 12008
##The port number is for the fifth auxiliary ECS.
netserver -p 12009
netserver -p 12010
##The port number is for the sixth auxiliary ECS.
netserver -p 12011
netserver -p 12012
##The port number is for the seventh auxiliary ECS.
netserver -p 12013
netserver -p 12014
##The port number is for the eighth auxiliary ECS.
netserver -p 12015
netserver -p 12016
Log in to auxiliary ECS 1.
netperf -H 192.168.2.10 -p 12001 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12002 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 2.
netperf -H 192.168.2.10 -p 12003 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12004 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 3.
netperf -H 192.168.2.10 -p 12005 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12006 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 4.
netperf -H 192.168.2.10 -p 12007 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12008 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 5.
netperf -H 192.168.2.10 -p 12009 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12010 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 6.
netperf -H 192.168.2.10 -p 12011 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12012 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 7.
netperf -H 192.168.2.10 -p 12013 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12014 -t TCP_STREAM -l 300 -- -m 1440 &
Log in to auxiliary ECS 8.
netperf -H 192.168.2.10 -p 12015 -t TCP_STREAM -l 300 -- -m 1440 &
netperf -H 192.168.2.10 -p 12016 -t TCP_STREAM -l 300 -- -m 1440 &
After the test is complete, the output of the netperf process on one TX end is shown in Figure 1. The final result is the sum of the test results of the netperf processes on all TX ends.
There are a large number of netperf processes. To facilitate statistics collection, it is a good practice to run the following command to view test data on the tested ECS using sar:
sar -n DEV 1 60
iperf3 -s -p 12001 &
iperf3 -s -p 12002 &
In the preceding commands, -p specifies the listening port.
##Auxiliary ECS 1
iperf3 -c 192.168.2.11 -p 12001 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.11 -p 12002 -u -b 100M -t 300 -l 16 -A 1 &
##Auxiliary ECS 2
iperf3 -c 192.168.2.12 -p 12001 -u -b 100M -t 300 -l 16 -A 2 &
iperf3 -c 192.168.2.12 -p 12002 -u -b 100M -t 300 -l 16 -A 3 &
##Auxiliary ECS 3
iperf3 -c 192.168.2.13 -p 12001 -u -b 100M -t 300 -l 16 -A 4 &
iperf3 -c 192.168.2.13 -p 12002 -u -b 100M -t 300 -l 16 -A 5 &
##Auxiliary ECS 4
iperf3 -c 192.168.2.14 -p 12001 -u -b 100M -t 300 -l 16 -A 6 &
iperf3 -c 192.168.2.14 -p 12002 -u -b 100M -t 300 -l 16 -A 7 &
##Auxiliary ECS 5
iperf3 -c 192.168.2.15 -p 12001 -u -b 100M -t 300 -l 16 -A 8 &
iperf3 -c 192.168.2.15 -p 12002 -u -b 100M -t 300 -l 16 -A 9 &
##Auxiliary ECS 6
iperf3 -c 192.168.2.16 -p 12001 -u -b 100M -t 300 -l 16 -A 10 &
iperf3 -c 192.168.2.16 -p 12002 -u -b 100M -t 300 -l 16 -A 11 &
##Auxiliary ECS 7
iperf3 -c 192.168.2.17 -p 12001 -u -b 100M -t 300 -l 16 -A 12 &
iperf3 -c 192.168.2.17 -p 12002 -u -b 100M -t 300 -l 16 -A 13 &
##Auxiliary ECS 8
iperf3 -c 192.168.2.18 -p 12001 -u -b 100M -t 300 -l 16 -A 14 &
iperf3 -c 192.168.2.18 -p 12002 -u -b 100M -t 300 -l 16 -A 15 &
##Auxiliary ECS 1
iperf3 -s -p 12001 -A 0 -i 60 &
iperf3 -s -p 12002 -A 1 -i 60 &
##Auxiliary ECS 2
iperf3 -s -p 12003 -A 2 -i 60 &
iperf3 -s -p 12004 -A 3 -i 60 &
##Auxiliary ECS 3
iperf3 -s -p 12005 -A 4 -i 60 &
iperf3 -s -p 12006 -A 5 -i 60 &
##Auxiliary ECS 4
iperf3 -s -p 12007 -A 6 -i 60 &
iperf3 -s -p 12008 -A 7 -i 60 &
##Auxiliary ECS 5
iperf3 -s -p 12009 -A 8 -i 60 &
iperf3 -s -p 12010 -A 9 -i 60 &
##Auxiliary ECS 6
iperf3 -s -p 12011 -A 10 -i 60 &
iperf3 -s -p 12012 -A 11 -i 60 &
##Auxiliary ECS 7
iperf3 -s -p 12013 -A 12 -i 60 &
iperf3 -s -p 12014 -A 13 -i 60 &
##Auxiliary ECS 8
iperf3 -s -p 12015 -A 14 -i 60 &
iperf3 -s -p 12016 -A 15 -i 60 &
Log in to auxiliary ECS 1.
iperf3 -c 192.168.2.10 -p 12001 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12002 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 2.
iperf3 -c 192.168.2.10 -p 12003 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12004 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 3.
iperf3 -c 192.168.2.10 -p 12005 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12006 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 4.
iperf3 -c 192.168.2.10 -p 12007 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12008 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 5.
iperf3 -c 192.168.2.10 -p 12009 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12010 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 6.
iperf3 -c 192.168.2.10 -p 12011 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12012 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 7.
iperf3 -c 192.168.2.10 -p 12013 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12014 -u -b 100M -t 300 -l 16 -A 1 &
Log in to auxiliary ECS 8.
iperf3 -c 192.168.2.10 -p 12015 -u -b 100M -t 300 -l 16 -A 0 &
iperf3 -c 192.168.2.10 -p 12016 -u -b 100M -t 300 -l 16 -A 1 &
Figure 2 shows an example of the UDP PPS test result.
There are a large number of iperf3 processes. To facilitate statistics collection, it is a good practice to run the following command to view test data on the tested ECS using sar:
sar -n DEV 1 60
qperf &
qperf 192.168.2.10 -m 64 -t 60 -vu udp_lat
After the test is complete, the lat value in the command output is the latency between ECSs.