You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Performance test
Baseline performance test for ECS instances
Copy page
Download PDF
Baseline performance test for ECS instances
This topic describes how to use tools to test the performance of the ECS instance CPU, memory, network, and volume. This allows you to learn the ECS instance performance based on the data from test results.​
Test principles​
For the smooth operation of your business, you need to comprehensively test the performance of your ECS instance that hosts the services. Make sure that you follow the principles below during performance tests:​
  • Objective: Clearly specify the specifications of the ECS instances to be tested (of CPU cores, CPU frequency, memory, storage, network bandwidth, operating system, and other components) and testing methods (such as deployment plans, instance numbers, and service load). This helps generate a fair and objective test result.​
  • Reasonable: Run the tests based on your needs and actual scenarios.​
  • Accurate: Select mature, stable, and authoritative testing tools and test cases. This allows the test results to reflect the ECS instance performance accurately.​
Testing tools and key metrics​
​
Type​
Test tool​
Test metrics​
CPU​
UnixBench​
Single-core benchmark score​
​
​
Multi-core benchmark score​
​
SuperPI​
Calculation duration​
​
Sysbench​
Average number of events completed per second​
Memory​
Stream​
Bandwidth​
​
MLC​
Latency​
​
Sysbench​
Bandwidth​
Network​
iPerfs​
bps, pps​
​
Pktgen​
​
​
Netperf​
​
Volume​
FIO​
I/O latency​
​
​
IOPS​
​
dd​
Bandwidth​
​
Sysbench​
IOPS, bandwidth​
​
Test environment​
Prepare the environment​
tip​
The test environment and methods provided in this topic are for reference only and do not represent the actual optimal performance of the instance.​
Software version​
ECS Instance operating system: In the example provided in this topic, CentOS 8.3 is used.​
Test CPU performance​
​
CPU single-core/multi-core performance testing via UnixBench
Calculation duration testing via SuperPI
CPU load testing via Sysbench
​
Test description​
UnixBench is an open-source tool for testing the basic performance of UNIX systems. It is also commonly used for testing ECS instance performance. You can run various tests via UnixBench to assess system performance from different aspects. Each test result is compared against a baseline value to generate an index score. Then, the index scores of all test items are combined to generate an overall test score.​
Procedure​
  1. Execute the following commands to download and install UnixBench.​
  • ​
    wget https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz​
    tar -zxvf v5.1.3.tar.gz​
    cd byte-unixbench-5.1.3/UnixBench​
    make​
    ​
  1. Execute the following command to run the single-core test.​
  • ./Run -c 1​
  • The execution process may take longer, so please wait patiently. The test score will be displayed as shown in the following picture. Refer to the values of "INDEX" for the result. The higher the values, the better the performance.​
  • ​image.png​​
  1. Execute the following commands to run the multi-core test.​
  • ​
    # Obtain the number of CPU threads (core)​
    cat /proc/cpuinfo| grep "processor"| wc -l​
    ./Run -c {core}​
    ​
  • The execution process may take longer, so please wait patiently. The test score will be displayed as shown in the following picture. Refer to the values of "INDEX" for the result. The higher the values, the better the performance.​
  • ​image.png​​
​
Test memory performance​
​
Test bandwidth via Stream
Test latency via MLC
Test Memory load via Sysbench
​
Test description​
Stream is an industry-recognized tool for testing memory performance comprehensively. Supported operations include Copy, Scale, Add, and Triad.​
For more information, visit the Stream official website and refer to Stream user guide.​
Procedure​
  1. Execute the following commands to download and install Stream.​
  • ​
    wget https://www.cs.virginia.edu/stream/FTP/Code/stream.c​
    yum -y install gcc​
    ​
  1. Edit the test script.​
  • gcc -O -fopenmp -mcmodel=medium -DSTREAM_ARRAY_SIZE=200000000 -DNTIMES=100 stream.c -o stream_omp_exe​
  • ​
    Parameter​​
    Description​
    STREAM_ARRAY_SIZE​
    Specifies the array size used for testing.​
    Default value: 10,000,000. Stream creates three arrays of the size value specified in the STREAM_ARRAY_SIZE parameter. Default element type: double.​
    For reference, the memory used in the script above is 3 × STREAM_ARRAY_SIZE × sizeof(double) = 4.5 GiB. You can modify the value based on your needs.​
    NTIMES​
    Specifies the number of runs for the test case. The final result will be the best one among all runs.​
    Default value: 10. Typically, you do not need to change this value.​
    ​
  1. Execute the following commands to run the bandwidth test.​
  • ​
    # On the same NUMA node​
    numactl -N 0 -m 0 ./stream_omp_exe ​
    # Cross-NUMA nodes​
    numactl -N 1 -m 0 ./stream_omp_exe​
    ​
  • ​
    Parameter​​
    Description​
    numactl​
    Specifies the NUMA policy for process and memory allocation.​
    For example, -N 0 -m 0 means using the CPU and the memory of NUMA node 0; -N 1 -m 0 means using the CPU of NUMA node 1 and the memory of NUMA node 0.​
    ​
  • After execution, the final result score will be displayed as shown below. Refer to the values of "Best Rate MB/s". The higher the values, the better the performance.​
  • ​image.png​​
​
Test network performance​
Test volume performance​
Last updated: 2026.06.24 17:17:26