HWBOT Prime Benchmark Script
Table of contents
To test my overclocked RPis I needed a tool to compare them. Beside the x264 Benchmark1, I chose the HWBOT Prime benchmark2. It’s a very popular one at HWBOT, with more than 165,000 submitted scores.
Because it runs on every device with a Java runtime, many submissions with various systems and devices were uploaded and still being uploaded today.
So I wrote a little script, which I want to share with you.
I like to get things in order. It’s easier to start a script, which collects all needed data, runs the benchmark and saves the file you need for uploading, than typing every command one by one.
Pretty sure the time I spend scripting this, is more time I would ever spend on typing the commands, but so you don’t need to.
If you want to participate with uploading your benchmark score to the HWBOT Prime database, you have all the information needed to upload it for the right Raspberry Pi model you are actually benchmarking. Currently, quite a few scores are uploaded for the wrong model.
Of course a RPi3 with 4x 1,500 MHz beats an original RPi with 1x 700 MHz, but since the identification inside the benchmark itself is not that good, this script will help you not to upload a wrong submission to the database.
To know which OS and firmware you are using, these two information are displayed.
In order to get your RPi to the latest stable OS, just download and install the current available version of the Raspberry Pi OS from the official webseite.3
I prefer the Lite version, becasue it doesn’t have unnessary software installed, but you can also use the version with desktop. Your choice.
To get the latest stable kernel just update your installation:
sudo apt update && sudo apt -y upgrade
After a reboot you are ready to go.
If you want to get the latest (maybe unstable) kernel and firmware you can install it with:
I always you the latest updates, because you get the current fixes and maybe restrictions regarding the overclocking-limit are removed some time before they hit the official and stable kernel you get with
If your RPi runs services on a production level, maybe updating to a possibly unstable kernel version is not the best idea, but for testing purposes it’s fine.
Then the currently installed kernel is displayed. Nothing special.
Since the benchmark needs a Java runtime to run and there are a differences between different Java installations your currently installed runtime is shown here.
I wrote a short notice which runtime you can or should use down below.
To identify which Raspberry Pi you are benchmarking the correct model is read which
Now you know the exact model incl. revision of the board and the used processor. Since the benchmark doesn’t recognize the processor accurately, please use this information to identify.
The sensor data section reads all information regarding to clock speeds, voltages and temperatures, even after the benchmark.
Data is read by
vcgencmd measure_clock arm/pllb/core,
vcgencmd get_config sdram_freq,
vcgencmd measure_volts core/sdram_c and
Unfortunatelly I had to improvise with the memory clock speed, because you can’t read out the actual clock. You need to read, what clock is stored inside the config (
For the RPi4 the frequency of the ARM-processor and frequency of the PLLB (x2 the clock speed of the processor) are the interesting ones, since core and memory cannot be changed.
From the original RPi to the Model 3 B+, the other frequencies are also valuable since they improve the performance, when overclocked. Don’t expect too much, but there is a small difference.
The frequency provided by the HWBOT Prime benchmark is also not valid, if you reach the limit of the BCM2711. It reads 2,694.97 MHz instead of 2,500 MHz. Keep in mind, if you upload the score, you have to manually correct it.
The two main voltages are the ones for the processor and for the memory. Nothing special, but keep in mind, memory-overclocking is only available for RPi3 and below.
Data for temperatures of the processor is divided into three parts - an idle one just before the benchmark, the temperature just at the end of the benchmark, provided by the HWBOT Prime benchmark and the post-load temperature after the benchmark ended.
I added the post-load one, because I had problems with sub-zero temperatures. The benchmark itself always read 0.0 °C, so a post-load temperature is better than an implausible one. If the benchmark reads a plausible temperature, just use it, otherwise take the slightly incorrect one.
How to use
I uploaded the script to my GitHub Gist-account, which you can download with the following line:4
To get the script executable, just type:
sudo chmod +x rpi_hwbot.sh
Running the script for the first time on a freshly installed OS, with no Java runtime installed and the benchmark itself, I added a small installation-routine.
--install the OpenJDK 8 Java runtime is installed and the needed HWBOT Prime benchmark is downloaded from the server.
Now everything is ready to run the script for its designed purpose.
Notice: I always use Raspberry Pi OS Lite, because I don’t need a desktop amd OpenJDK 8, because it has slightly better performance than version 11.
If you want to run the script on your daily RPi with OpenJDK 11 installed, just download the HWBOT Prime Benchmark separately:
The script in action
After downloading and installing you launch the script by typing
The screenshot below shows a quick run on one of my RPi4Bs.
The script saves the current run as a
.hwbot file. You can use it for uploading your score to the HWBOT Prime Database.
Beside this file, you can make a screenshot like the one below. Unfortunatelly the hardware-identification made by the HWBOT Prime Benchmark is not that good. Every SoC is recognized as a BCM2835 or not at all. While uploading the score, you have to double-check the processor.
From time to time I will update the script, when I think there is something missing.
If you want to participate in benchmarking our beloved Raspberry Pis, it would be great to use this script or build an own one.
As always, if you think there is something still missing or could be better, drop me a line and will update the script.
Only optimizations, which could be considered cheating, will not be accepted. Let’s all play fair!