Cloud vendor virtual machine performance test

Test tools and main indicators

Classification test tools Test indicators
CPU UnixBench single core score
Multi-core running score
SuperPI Calculation time
Memory Stream bandwidth
MLC time delay
network iPerfs bps、pps
Pktgen
Netperf
cloud disk FIO IOPS
I/O latency
dd bandwidth

test environment

Preparation

Environmental preparation

illustrate

The test environment and methods given in this article are for reference only, and do not represent the actual optimal performance of the instance.

Software version

Cloud server operating system: This article takes CentOS 8.3 as an example.

Test Methods

CPU performance test

UnixBench test CPU single-core/multi-core performance

Test instruction

UnixBench is an open source tool for testing the basic performance of UNIX systems, and a relatively general tool for testing the performance of cloud servers. UnixBench will perform a series of tests to test the performance of various aspects of the system, and then compare each test result with a benchmark value to obtain an index value. The index values ​​of all test items are combined to form a test score value.

test steps
  1. Log in to the cloud server to be tested .

  2. Execute the following command 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
  3. Execute the following command to perform a single-core test.
    ./Run -c 1

    Please wait patiently after executing this command, the process may be long, and the final score will be displayed on the screen. The result refers to the Index value, the higher the value, the better the performance.

    image.png

  4. Execute the following command to perform a multi-core test.

    # 获取 CPU 的线程数 core
    cat /proc/cpuinfo| grep "processor"| wc -l
    ./Run -c {core}

    Please wait patiently after executing this command, the process may be long, and the final score will be displayed on the screen. The result refers to the Index value, the higher the value, the better the performance.

    image.png

SuperPI test calculation time

Test instruction

SuperPI is a computer program that calculates pi with a maximum accuracy of 32 million digits after the decimal point. It is a quick reference benchmark often used for overclocking or comparing different CPU and hardware configurations.

test steps

Execute the following commands to install and test the SuperPI tool.

git clone https://github.com/Fibonacci43/SuperPI.git
cd ./SuperPI
gcc -O -funroll-loops -fomit-frame-pointer pi_fftcs.c fftsg_h.c -lm -o pi_css5
# 通过计算精度为 1<<22=4194304 的 π 的值,测试 CPU 的计算能力
./pi_css5 $((1<<22))

If you are prompted that Git is not installed, you can execute the following command to install it.

# CentOS下使用
yum install git -y

# Ubuntu/Debian下使用
apt-get install git -y

After executing the above command, the calculation time is echoed as shown in the figure below. The smaller the value, the shorter the time and the stronger the calculation ability.

image.png

memory performance test

Stream test bandwidth

Test instruction

Stream is one of the industry-recognized comprehensive memory performance measurement tools. Sream supports four operations: Copy, Scale, Add, and Triad.

For more information, please go to  Stream official website address  and  Stream usage instructions  .

test steps
  1. Run the following commands to download and install Stream.

    wget https://www.cs.virginia.edu/stream/FTP/Code/stream.c
    yum -y install gcc
  2. Write test scripts.

    gcc -O -fopenmp -mcmodel=medium -DSTREAM_ARRAY_SIZE=200000000 -DNTIMES=100 stream.c -o stream_omp_exe

    Parameter Description:

    parameter illustrate

    STREAM_ARRAY_SIZE

    Specifies the size of the array used by the test.
    The default is 10000000. Stream will create an array of 3  STREAM_ARRAY_SIZE sizes, and the array element type is double by default.
    The memory used in the above reference script is 3 × STREAM_ARRAY_SIZE × sizeof(double)=4.5GiB, which can also be modified according to actual needs.
    NTIMES Specify the number of times to run the test case, and the final result is the best one.
    The value defaults to 10 and usually does not need to be modified.
  3. Execute the following command to test the bandwidth.

    # 同 numa 内存带宽 
    numactl -N 0 -m 0 ./stream_omp_exe 
    # 跨 numa 内存带宽 
    numactl -N 1 -m 0 ./stream_omp_exe

    Parameter Description:

    parameter illustrate
    numactl NUMA policy that controls process and memory allocation.
    For example, -N 0 -m 0it indicates the use of NUMA0 CPU and NUMA0 memory, and -N 1 -m 0indicates the use of NUMA1 CPU and NUMA0 memory.

    After executing this command, the final result score is displayed as shown in the echo in the figure below. The results refer to the Best Rate value, and the higher the value, the better the performance.

    image.png

MLC Test Latency

Test instruction

MLC (Memory Latency Checker) is Intel's memory testing tool, which can effectively and conveniently test memory latency and bandwidth. The tool also provides options for a range of fine-grained tests from specific processor cores to cache or memory.

test steps
  1. Run the following commands to download and install MLC.

    wget https://software.intel.com/content/dam/develop/external/us/en/protected/mlc_v3.9.tgz
    yum install glibc -y
    tar -xzvf mlc_v3.9.tgz
  2. Execute the following command to perform a delay test.

    cd ./Linux/
    ./mlc --latency_matrix -e -r

    Parameter Description:

    parameter

    illustrate

    --latency_matrix Print same-NUMA and cross-NUMA memory latency matrix
    -e output test results that do not modify prefetcher settings
    -r Output the delay result obtained by random access

    After executing this command, the matrix of local and cross-socket memory latency will be printed on the screen. The lower the value, the lower the latency.

    image.png

Network Performance Test

See Testing Network Performance Using iPerf3 , Testing Network Performance Using Pktgen , Testing Network Performance Using Netperf .

Cloud Disk Performance Test

See Testing storage performance .

Transferred from:

Cloud Server Performance Benchmark--Cloud Server-Volcano Engine

Guess you like

Origin blog.csdn.net/grace_yi/article/details/132196705