Express Connect:Test the performance of an Express Connect circuit
Last Updated:May 19, 2022
After an Express Connect circuit is deployed, you must test its network performance
to ensure that the Express Connect circuit can meet your business requirements. This
topic describes how to test the performance of an Express Connect circuit by using
Netperf and iPerf3.
Prerequisites
An Express Connect circuit is deployed and configured. Your data center is connected
to Alibaba Cloud through the Express Connect circuit.
An on-premises device is prepared to serve as the client or server in the Netperf
or iPerf3 test.
In this example, the IP address of the on-premises device is 192.168.100.1.
Eight Elastic Compute Service (ECS) instances that are deployed in virtual private
clouds (VPCs) are created. The ECS instances serve as clients or servers in the Netperf
or iPerf3 test. The ECS instances are connected to the on-premises device to transmit
configuration information and test results.
In this example, the ECS instances use the ecs.se1.2xlarge type. The image is centos_7_2_64_40G_base_20170222.vhd
and the IP address range is 172.16.0.2 to 172.16.0.9.
Set up the test environment
Install Netperf and iPerf3
To install Netperf and iPerf3 on the on-premises device and ECS instances, perform
the following operations:
Note The following operations describe how to install Netperf and iPerf3 on an ECS instance.
Log on to the ECS instance. For more information, see Overview.
Install Netperf.
Run the following command to download the Netperf installation package:
cd iperf
./configure && make && make install && cd ..
cd src
ADD_PATH="$(pwd)"
PATH="${ADD_PATH}:${PATH}"
export PATH
Run the iperf3 -v command to check whether iPerf3 is installed.
If the system returns the following information, it indicates that Netperf is installed.
iperf 3.10.1+ (cJSON 1.7.13)
Linux iZbp15y0zrhx2ry6vo1b4wZ 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64
Enable the multi-queue feature
Assume that the interface eth0 is connected to the Express Connect circuit. Run the
ethtool -L eth0 combined 4 command on the on-premises device to enable the multi-queue feature.
In this example, the following information is returned.
Use Netperf to test the packet forwarding performance of the Express Connect circuit.
Overview of Netperf
After Netperf is installed, two command line interface (CLI) tools are created: netserver
(server) and netperf (client). The following table describes the main parameters.
Tool
Main parameter
Parameter description
netserver
-p
The port number of the listener.
netperf
-H
The IP address of the on-premises device or ECS instance.
-p
The port of the on-premises device or ECS instance.
-l
The duration for which the tool runs.
-t
The protocol used to send packets. Valid values: TCP_STREAM and UDP_STREAM.
We recommend that you use UDP_STREAM.
-m
The size of the packets.
We recommend that you set the value to 1 when you test packets per second (PPS).
We recommend that you set the value to 1400 when you test bits per second (BPS).
Test the packet forwarding performance of the on-premises device as a server
Run the following commands to start the netserver process on the on-premises device
and specify different ports.
Run the netperf -H server_ip -p port 6 -t UDP_STREAM -l 300 -- -m 1 command on the eight ECS instances to start the netperf process and specify the ports
of netserver as ports of the ECS instances.
Test the packet forwarding performance of the on-premises device as a client
Run the netserver -p 11256 command on the ECS instances to start the netserver process and specify ports.
Run the netperf -H ECS_ip -p port -t UDP_STREAM -l 300 -- -m 1 command on the on-premises device to start eight netperf processes and specify different
IP addresses for the ECS instances.
The following result is displayed when netperf processes are complete on the client
side. You can use the following formula to calculate the PPS: PPS = Number of packets
that are sent/Duration of the test.
The following table describes the fields in the test result.
Field
Description
Socket Size
The buffer size.
Message Size
The packet size. Unit: bytes.
Elapsed Time
The duration of the test. Unit: seconds.
Message Okay
The number of packets that are sent.
Message Errors
The number of packets that fail to be sent.
Throughput
The network throughput. Unit: Mbit/s.
Use iPerf3 to test the bandwidth of the Express Connect circuit
Overview of iPerf3
The following table describes the main parameters of iPerf3.
Main parameter
Parameter description
-s
Applies to only the server, which specifies that iPerf3 runs in server mode.
-c
Applies to only the client, which specifies that iPerf3 runs in client mode.
-i
Specifies the interval between two reports. Unit: seconds.
-p
Specifies the port of the server listener. By default, the port number is 5201 and
TCP and UDP are used.
Specifies the port of the client. By default, the port number is 5201. If the -u parameter
is also set, it indicates that UDP is used to initiate connections. Otherwise, TCP
is used.
-u
Uses UDP to send packets. If this parameter is not set, TCP is used.
-l
Specifies the length of the read/write buffer. We recommend that you set the value
to 16 when you test the packet forwarding performance. When you test the bandwidth,
we recommend that you set the value to 1400.
-b
Specifies the bandwidth used in UDP mode. Unit: bit/s.
-t
Specifies the duration of transmission. iPerf3 repeatedly sends packets of the specified
length in the specified duration. The default duration is 10 seconds.
-A
The CPU affinity. You can associate an iPerf3 process with the logical CPU of the
corresponding number to avoid cross-CPU scheduling of the iPerf3 process.
Test the bandwidth of the on-premises device as a server
Run the following commands on the on-premises device to start the iPerf3 process in
server mode and specify different ports.
Run the iperf3 -u -l 16 -b 100m -t 120 -c server_ip -i 1 -p port -A 1 command on the ECS instances to start the iPerf3 process in client mode and specify
the ports of the on-premises device as the ports of the ECS instances.
Run the following commands:
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16001 -A 1 #The first ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16002 -A 2 #The second ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16003 -A 3 #The third ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16004 -A 4 #The fourth ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16005 -A 5 #The fifth ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16006 -A 6 #The sixth ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16007 -A 7 #The seventh ECS instance
iperf3 -u -l 16 -b 100m -t 120 -c 192.168.100.1 -i 1 -p 16008 -A 8 #The eighth ECS instance
Test the bandwidth of the on-premises device as a client
Run the iperf3 -s -i 1 -p 16001 command on the ECS instances to start the iPerf3 process in server mode and specify
ports.
Run the following commands on the on-premises device to start eight iPerf3 processes
in client mode.
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.2 -i 1 -p 16001 -A 1
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.3 -i 1 -p 16001 -A 2
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.4 -i 1 -p 16001 -A 3
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.5 -i 1 -p 16001 -A 4
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.6 -i 1 -p 16001 -A 5
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.7 -i 1 -p 16001 -A 6
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.8 -i 1 -p 16001 -A 7
iperf3 -u -l 16 -b 100m -t 120 -c 172.16.0.9 -i 1 -p 16001 -A 8
Analyze the test result
The following result is displayed when iPerf3 processes are complete on the client
side. You can use the following formula to calculate the PPS: PPS = Number of packets
that are received by the peer/Duration of the test.
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-10.00 sec 237 MBytes 199 Mbits/sec 0.027 ms 500/30352 (1.6%)
[ 4] Sent 30352 datagrams
Note We recommend that you run the sar command on the server side to count the packets that are actually received. Example:
sar -n DEV 1 320.
The following table describes the fields in the test result.
Field
Description
Transfer
The total amount of data that is transmitted.
Bandwidth
The bandwidth.
Jitter
The network jitter.
Lost/Total Datagrams
The packet loss rate, which is calculated by the following formula: Packet loss rate
= Number of dropped packets/Total number of packets.