Benchmark Storage Performance on Linux

Linux Storage Benchmark
Linux Storage Benchmark

When attempting to determine storage performance on Linux there are common tests such as doing a DD write command and measuring the speed of that. These methods leave a lot to be desired and are especially bad at measuring random read/write performance (the most important for operating system / application performance).

I solved this problem for the Raspberry Pi by creating Pi Benchmarks. This is an open source benchmark that *does* measure random read/write performance as well as several other important factors (IOPS, etc.). We’ve collected many years worth of performance data across thousands of different drives including SSDs / HDDs / others. It’s enough information to be used to make important decisions about performance using hard data.

I’d like to announce that this exact same benchmark is now available for all devices! If you’d previously taken the benchmark on a PC or device other than a Raspberry Pi those results are now retroactively live on the site.

Benchmark Instructions

The benchmark can be ran with the following command:

sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash

If you want to choose which drive to test you can alternatively do:

wget https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh
chmod +x Storage.sh
sudo ./Storage.sh /path/to/storage

Comparing Benchmarks

PiBenchmarks.com - Benchmark #43289
PiBenchmarks.com – Benchmark #43289

Once the benchmark completes you will receive a score and a breakdown of the different performance measurements that are used to calculate that score. This will display immediately in the window you are taking the benchmark.

This score is meant to be compared with other scores at https://pibenchmarks.com. Once you take the benchmark within about a minute or two the result will show live on the site. If you click the score link it will take you to a detailed breakdown of each benchmark.

You can browse the site by drive, system board, type, and many other categories. It also has a search function!

Compatibility

The benchmarks compatibility had basically grown to all flavors of Linux that run on the Raspberry Pi. On these flavors the benchmark will retrieve any dependencies needed to perform the benchmark. This should work on most distros.

Known working ones include:

  • Ubuntu
  • Debian
  • Mint
  • Raspberry Pi OS
  • Arch Linux
  • Fenix
  • Kali
  • Manjaro
  • CentOS
  • Fedora
  • Alpine
  • Pop
  • GalliumOS
  • SparkyLinux
  • Armbian
  • Deepin
  • openSUSE
  • Garuda

I am definitely expecting problems though expanding this to PC. There are so many more flavors of Linux that run on PC. If you have a distro that is having trouble with it let me know in the comments and I will definitely get it working for that distro!

Conclusion

I’m very excited to be expanding the storage benchmark as I’ve been working toward this for years now. There are a handful of other benchmarking sites out there and none of them really worked the way I wanted them to for actually making meaningful comparisons so I created this benchmark with an emphasis on random read/write (OS/application) performance.

Thanks to everyone who had already taken this over the years even though the results didn’t display live yet! If you have ideas / requests / feedback definitely let me know here in the comments or on the GitHub issues page. I’m always looking to improve it!

Other Resources

Official GitHub Page

Benchmarking SBC (Single Board Computer) Storage Performance for Embedded Devices

Subscribe
Notify of
guest

12 Comments
Inline Feedbacks
View all comments
mike91390
mike91390
8 months ago

Hello,
When I use raspios
error: SQLSTATE[HY000]: General error: 3988 Conversion from collation utf8mb3_general_ci into utf8mb4_bin impossible for parameter
and the result is not saved, whereas with ubuntu 23.10 there is no error and the results are saved.
How do I configure raspios to avoid this error?
Best regards

mike91390
mike91390
8 months ago

Hello
After reconfiguration of the locales:
┌──(michel㉿RASPI-05)-[~]
└─$ sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
en_GB.UTF-8... done
en_US.UTF-8... done
fr_FR.UTF-8... done
Generation complete.
and reboot
And I get the same error, and here are the characteristics of my system:
Raspberry Pi 5 Model B Rev 1.0
CPU: Cortex-A76 Core: 4 Speed (MHz): 2800 GPU Speed: 900
Distribution: Debian GNU/Linux 12 (bookworm)
Kernel: 6.6.21-v8-16k+ #1742 SMP PREEMPT Tue Mar 12 19:50:21 GMT 2024 aarch64
Stockage:
InterFace: GeekPi(S2Pi) N04
Modéle: Samsung model: SSD 990 PRO 1TB size: 931.51 GiB NVMe Version: 2.0
Capacité: 931.51 GiB used: 6.7 GiB (0.7%)

the problem lies in the concatenation of these 2 lines:

Test_nvme=$(nvme list -o json 2>&1 | sed 's/\x0//g')
Test_nvme+=$(nvme show-regs "$BootDrive" -H 2>&1 | sed 's/;/!/g' | sed 's/\x0//g')

Thank you for the effort you put into this.

mike91390
mike91390
8 months ago

Hello,
First of all, I’d like to thank you for your work. I’m contacting you because I’ve done a number of tests with a Crucial P3 Plus 1TB ssd on a Raspberry Pi 5 using Geekworm X1001 Pcie, and none of them appear on the site. Do I need to register to see my results published?
Sincerely
michel

rmkilc
rmkilc
1 year ago

When I run this on my Orange Pi 5 Plus with a 970 EVO Plus M.2 NVMe SSD, I don’t get the “Result submitted successfully” line. But otherwise the test appears to run correctly otherwise and gives results and a score. Why is it not uploading the results?

Geoff Palmer
Geoff Palmer
1 year ago

I have just submitted my first testing. Was very disapointed with my score however it is a very odd microSD card on a Pi 3b so might not show in the reports i think.
This is the card i am using
Would love for this to be added 🙂 My username i used on the report is Sabitech

Schugy
Schugy
2 years ago

It’s great that the benchmark works on PCs with almost any distro. There was no hdparm result on openSuse Leap 15.4 but my tiny 128 gb Samsung UFS card scored 7169 points. Maybe this error is the reason why the result wasn’t published. The script checked for apt and pacman but not for zypper. I also wonder whether it harms the internal SSD when it is trimmed 3 times in 5 minutes while testing a memory card in an external USB card reader. Thank you for the effort you put into this.