In this article, we’ll be benchmarking some of the available RISC‑V single-board computers (SBCs) using SPEC 2017. We'll be diving into both single-core and multi-core CPU performance to see how these boards handle real-world compute workloads.
We’ll also walk through the complete setup process for running SPEC 2017 on RISC‑V hardware — so you can easily replicate the benchmarks on your own system.
1. System & Environment Details
All system, hardware and environment specifications used in this benchmark — including vendor, board name, OS, compiler version, SoC, CPU, cores, RAM, and RISC‑V extensions — are listed in the table below.
2. Setup and Installation
SPEC CPU 2017 is a licensed benchmark suite, so you must obtain it from SPEC’s website. In this article, I'll go with "cpu2017-1.1.9.iso" version. Once get the .iso file follow these below steps:
export ISO_FILE="cpu2017-1.1.9.iso"
export MOUNT_DIR="$PWD/spec-mount"
mkdir $MOUNT_DIR && sudo mount "$ISO_FILE" "$MOUNT_DIR"
cd "$MOUNT_DIR" && ./install.sh
This will prompt you to confirm the path of installation, provide the absolution path where you want to install spec. In my case I installed it in "INSTALL_DIR="$PWD/spec-17"
To confirm the installation you can run these below commands:
cd $INSTALL_DIR && ./bin/runcpu -h
This should list all the available options for SPEC.
3. Running CPU benchmark
There are mainly 4 major benchmark types that SPEC provides as mentioned in 1.3 Benchmarks and Suites.
In this article we'll be going forward for only 'intrate' other benchmarks seem to have some problem running on RISCV as of today.
In order to run benchmark, follow these commands below.
cd "$INSTALL_DIR"
./bin/runcpu \
--config=gcc-linux-riscv.cfg \
--action=run \
--tune=all \
--iterations=1 \
--copies=$(nproc) \
--output_format=text,html,mail \
--reportable \
intrate
Note: Download the "gcc-linux-riscv.cfg" from here. To also run "fprate, intspeed, fpspeed" add these at the end of above command.
In this .cfg file search for 'EDIT' and it should point you, which variables/setting you need to change, mainly we should change the label, num cores, gcc and g++ path and version etc. For more details see all options here.
4. Auto-Setup CoreMark Script for RISCV
You can use this below script which automates setup and running the SPEC 2017 benchmark.
5. Benchmark Results & Performance Comparison
To cut the effort I've used the above script and that should give you following results.
5.1 Single Core
In order to run for single core make sure to update the `--copies=1 and --thread=1` in command mentioned in section 3. In this article we'll be only looking for multicore results. If you are running for single core or face any issue running SPEC for single core feel free to reach out to us at : cloud-v@10xengineers.io
5.2 Multi Core
Multi Core results for SPEC 2017 are attached below:
6. Overall Results and Conclusion
By running each test multiple times and averaging the results, we cut out random noise and get fair, consistent numbers. Looking at those numbers, the Milk-V Pioneer Box clearly leads the pack. The major reason being its multicore support having 64 Cores.
7. Appendices & Artifacts
SPEC 2017 Official Site
See Gist, Auto-Setup SPEC 2017 Script