This topic describes how to use SPEC CPU® 2017 to test the computing performance of Linux and Windows instances.

Prerequisites

An Elastic Compute Service (ECS) instance is created. For more information about how to create an ECS instance, see Create an instance by using the wizard.
  • Operating system: public images.
    • Windows Server: Windows Server 2016 or later. In this example, win2016_1607_x64_dtc_en-us_40G_alibase_20211217.vhd is used.
    • Linux: CentOS 7 or later. In this example, centos_7_04_64_20G_alibase_201701015.vhd is used.
  • Instance families: g7 general-purpose instance family, c7 compute-optimized instance family, or r7 memory-optimized instance family.
  • Network type: Virtual Private Cloud (VPC).
Note Operations in this topic involve third-party software. The procedure is for reference only. Contact your service manager for the test suite and perform the test based on your actual conditions. In this topic, the intrate test set is used. For more information about different test sets of the runcpu command, visit SPEC CPU®2017 Overview / What's New?

Procedure for Linux

  1. Connect to an ECS instance.
    For more information about connection methods, see Connection methods.
  2. Download the test tools.
    1. Download the SPEC CPU® 2017 tool from the official SPEC website.
      Note In this example, SPEC CPU® 2017 Version 1.0.5 is used. We recommend that you use Version 1.0.5 or later.
    2. Download the gcc-7 package. In this example, GCC v7.3.0 is used.
      wget https://benchmark-packages.oss-cn-qingdao.aliyuncs.com/gcc7.zip
    3. Download the configuration files required for the test.
      wget https://benchmark-packages.oss-cn-qingdao.aliyuncs.com/speccpu2017_config.zip
    4. Optional:If no decompression tools are available in the current instance, download a decompression tool.
      yum -y install unzip
  3. Install the test tools.
    1. Decompress the gcc7.zip file.
      unzip gcc7.zip
      cd gcc7
      bash make_gcc.sh
    2. Install SPEC CPU® 2017.
      In this example, SPEC CPU® 2017 is installed in the ./cpu2017 directory.
    3. Extract the speccpu2017_config.zip configuration file to a specified directory of SPEC CPU® 2017. For example, extract it to cpu2017/config/.
      unzip speccpu2017_config.zip -d cpu2017/config/
    4. Go to the directory of SPEC CPU® 2017.
      cd ./cpu2017
    5. Run the installation script.
      ./install.sh

      If the system prompts you to confirm whether the installation directory is correct, enter yes.

      Enter yes on the confirmation page
    6. Optional:Check whether SPEC CPU® 2017 is installed. For example, run the following command to view the help information of the tool:
      ./bin/runcpu --help
  4. Perform the computing performance stress testing.
    1. Optional: View the number of vCPUs of the instance.
      cat /proc/cpuinfo | grep process | wc -l
      View the number of vCPUs of the instance
    2. Run a test command. For example, run the following command to perform an intrate test:
      ./bin/runcpu --config=spec17-opti-gcc7.3.cfg --copies=4 --loose intrate
      Note The value of the copies parameter must be equal to the number of vCPUs of the instance.

Procedure for Windows

  1. Connect to an ECS instance.
    For more information about connection methods, see Connection methods.
  2. Download the test tools.
    Note In this example, SPEC CPU®2017 and Intel® C++ Compiler (ICC) are used. Operations in this topic involve third-party software. The procedure is for reference only. Contact your service manager for the test suite and perform the test based on your actual conditions. We recommend that you use SPEC CPU® 2017 Version 1.1.0 or later.
  3. Install the test tools.
    1. Create a folder named Extract and decompress packages to this folder.
    2. Extract the SPEC CPU® 2017 and speccpu2017_config.zip files to the Extract directory.
    3. Go to the Extract\specCpu2017-105\cpu2017 directory and grant the execute permission on the following files:
      • install.bat
      • tools\bin\windows-x64\*
    4. Open the Command Prompt and go to the directory in which install.bat resides. Run the following command to install the tools. In this example, the tools are installed to the speccpu2017 directory.
      ./install.bat ../speccpu2017
      Install SPEC CPU® 2017 in WindowsIf the system prompts for a verification, press the Enter key to skip it.
    5. In the file system, go to the speccpu2017 directory that is located in the C:\Users\SPECCP~1 directory.
    6. Find the speccpu2017\shrc.bat file and modify the file based on the comments in the following command lines:
      # Original file content:
      # rem set SHRC_PRECOMPILED=yes
      # Delete rem. This indicates that the tools are installed.
      # Modified file content:
      set SHRC_PRECOMPILED=yes
    7. Extract the binary file compiled by ICC to the speccpu2017 directory.
      Note The binary file compiled by ICC is extracted to the speccpu2017 directory, which allows you to skip the compilation process.
    8. Copy the speccpu2017\sh11.6-64\SHW64.DLL file to the speccpu2017\bin\ directory.
    9. Copy the windows-icc-binary-avx512-r.cfg and windows-icc-binary-avx2-r.cfg configuration files to the speccpu2017\config\ directory.
  4. Go back to the Command Prompt and perform stress testing on the instance.
    1. Run the following command in the directory in which speccpu2017\shrc.bat resides to load the execution directory:
      shrc
    2. Run a test command. For example, run the following command to perform an intrate test:
      runcpu --config=windows-icc-binary-avx512-r.cfg -N --threads=4 --copies=4 intrate
      Note The values of the copies and threads parameters must be equal to the number of vCPUs of the instance.

Result

Computing performance benchmark scores for major instance families