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
- Connect to an ECS instance.
- Download the test tools.
- 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.
- 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
- Download the configuration files required for the test.
wget https://benchmark-packages.oss-cn-qingdao.aliyuncs.com/speccpu2017_config.zip
- Optional:If no decompression tools are available in the current instance, download a decompression
tool.
- Install the test tools.
- Decompress the gcc7.zip file.
unzip gcc7.zip
cd gcc7
bash make_gcc.sh
- Install SPEC CPU® 2017.
In this example, SPEC CPU® 2017 is installed in the ./cpu2017 directory.
- 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/
- Go to the directory of SPEC CPU® 2017.
- Run the installation script.
./install.sh
If the system prompts you to confirm whether the installation directory is correct,
enter yes.

- Optional:Check whether SPEC CPU® 2017 is installed. For example, run the following command
to view the help information of the tool:
- Perform the computing performance stress testing.
- Optional: View the number of vCPUs of the instance.
cat /proc/cpuinfo | grep process | wc -l

- 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
- Connect to an ECS instance.
- 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.
- Install the test tools.
- Create a folder named Extract and decompress packages to this folder.
- Extract the SPEC CPU® 2017 and speccpu2017_config.zip files to the Extract directory.
- Go to the Extract\specCpu2017-105\cpu2017 directory and grant the execute permission on the following files:
- install.bat
- tools\bin\windows-x64\*
- 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

If the system prompts for a verification, press the
Enter key to skip it.
- In the file system, go to the speccpu2017 directory that is located in the C:\Users\SPECCP~1 directory.
- 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
- 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.
- Copy the speccpu2017\sh11.6-64\SHW64.DLL file to the speccpu2017\bin\ directory.
- Copy the windows-icc-binary-avx512-r.cfg and windows-icc-binary-avx2-r.cfg configuration files to the speccpu2017\config\ directory.
- Go back to the Command Prompt and perform stress testing on the instance.
- Run the following command in the directory in which speccpu2017\shrc.bat resides to load the execution directory:
- 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.