Linux Storage Benchmarking Script (SBCs, PCs and all Linux devices)
Now supports PCs and other SBCs!
Announcement is available here: https://jamesachambers.com/benchmark-storage-performance-on-linux/
Overview
Storage benchmarking script featuring a storage benchmark with a heavy emphasis on random read/write performance (essential for OS / application). This is far more accurate of a representation of actual performance than simply simulating writing a large file.
Anonymously uploads your score to pibenchmarks.com for the purposes of making real, meaningful performance comparisons between the different storage devices themselves as well as the platforms they are being used on (PC vs Raspberry Pi vs cloud storage vs others).
You can optionally supply a username which is used as a sort of tracking tag where you can easily see all benchmarks you've ever taken across all devices!
View Results
View current benchmarks, discussion and analysis at: https://jamesachambers.com/2020s-fastest-raspberry-pi-4-storage-sd-ssd-benchmarks/
View the full results at: https://pibenchmarks.com/
Running the Benchmark
To run the benchmark type/paste:
sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
If you want to choose which drive to test you can also use:
wget https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh
chmod +x Storage.sh
sudo ./Storage.sh /path/to/storage
Removing Installed Packages
Most of the packages the script installs are core system packages most of which should already be present. There are a couple benchmarking-only related ones that should be safe to remove if you want an absolute minimalist system.
If you want to remove the packages the script installed afterward you may do:
sudo apt remove iozone3 fio
These are iozone and fio which are both benchmarking utilities and should be safe to use unless you have something else installed that relies on them as a dependency (probably not likely but possible so make sure before removing packages).
Buy A Coffee / Donate
People have expressed some interest in this (you are all saints, thank you, truly)
- PayPal: 05jchambers@gmail.com
- Venmo: @JamesAChambers
- CashApp: $theremote
- Bitcoin (BTC): 3H6wkPnL1Kvne7dJQS8h7wB4vndB9KxZP7
Update History
November 26th 2023
- Added export LC_ALL=C to top of script to prevent language related issues on some systems
- Fix null bytes breaking test_nvme
- Fixed display issue with DD and HDParm tests showing the wrong units on very slow or very fast machines
January 1st 2023
- Increase DD write test to 130k blocks for increased NVMe accuracy
August 21st 2022
- Fix minor path errors on Orange Pi
August 14th 2022
- Fix parsing inside Docker (thanks mhaas, issue #24
- Add udev to dependencies (thanks mhaas, issue #25
August 13th 2022
- Fixed findmnt failing when target is not a mountpoint (thanks mhaas, issue #23
June 27th 2022
- Fixed udevadm giving a message that option 'w' was missing on some versions -- now runs a fallback test without that option
June 24th 2022
- PC results now show in "Latest" and a "Top PC Scores" section has been added!
- Reduce argument sizes to prevent curl upload error
- Fixed curl "argument list too long" error
- Fixed sdparm test overlapping with smartctl test
June 1st 2022
- Improve apt dependency installation -- won't run apt-update if all dependencies are present to save time
May 28th 2022
- Remove RAM column if it's not being used (it's not used on the Pi 4 and higher as the speed is fixed)
- Clean up garbled mess output from curl when submitted to website
- Remove clutter and useless output from IOZone test to show more data and less fluff
May 11th 2022
- Added 20 second timeout to udevadm test to prevent it from getting stuck forever in rare cases on some boards (thanks munecito issue #22)/li>
- Removed vendor field parsing
May 10th 2022
- Added some additional messages to help with debugging
April 29th 2022
- Added a couple more Gigabyte SBCs
- Added 4 Shuttle models that had benchmarks submitted for them -- marketed as the "smallest PC in the world"
April 28th 2022
- Added additional System Boards to PiBenchmarks.com System Boards and README
- System boards for PC and other types of devices like laptops, desktops, etc. are starting to be added quietly in the background
- PC results won't show on the "Latest" tab yet but you can find models that have already been done by searching for something like "Dell" or "HP" and you'll see System Boards that are being added from those manufacturers
April 26th 2022
- Removed "Vendor" field from submitted fields as it is no longer used for parsing
April 22nd 2022
- Added list of additional supported models (see bottom of README)
April 16th 2022
- Added support for other SBCs similar to the Pi such as ODROID, Banana Pi, Pine64, Radxa Rock Pi, Tinker Board, OrangePi, NVIDIA Jetson Nano and more
- These models were chosen based on the fact that people had already submitted benchmarks with them. I will add others if people benchmark on those devices as well!
- Full list of models available here
April 10th 2022
- Added instructions to remove packages the script uses that should be safe
March 20th 2022
- Added pre-run requirement check for lsblk and fio to be installed (tries automatically but if you are on an unusual distro you may need to manually install them)
- Fixed an issue where DD write wasn't being read correctly from computers using Japanese
March 17th 2022
- Fixed an issue with btrfs that would add the characters [/@] at the end of the detected drive (about 19 tests impacted)
August 4th 2021
May 29th 2021
- Added some additional status messages to make it more clear what the script is doing at any given time
- Added --no-install-recommends to most apt package installers to cut down on time running on a new system and unnecessary packages
- Moved upload URL to the new pibenchmarks.com domain
May 21st 2021
- Added dependency for libxml-dumper-perl to fix inxi on some platforms (thanks DMC!)
May 9th 2021
- Moved project frontend to pibenchmarks.com domain name
February 24th 2020
- Added xxd dependency (thanks vszakats)
- Added option to choose which drive/folder to test (thanks hvdwolf)
January 6th 2020
- Launched early beta of https://pibenchmarks.com/ results browser
- Fixed an issue where dmesg was giving too much output resulting in "argument list too long" error that prevented results from submitting (thanks winkelement)
December 22nd 2019
- Added new smartctl test to help identify drives on USB adapters that don't support hdparm
- Improved the hwinfo test to provide better drive identifying information
December 21st 2019
- Added new NVME test to help better identify NVME drives
- Double quoted variables to ensure maximum compatibility across distros
December 2nd 2019
- Merged pull request from pschmitt improving the test dramatically on Arch Linux (thanks!)
- Fixed issue where dmesg test could contain characters that could break the test
- Removed all instances of "N/A" in favor of leaving the field blank and saving thousands of unneccessary bytes
November 24th 2019
- Added SSD adapter detection
- Added dmesg test in order to detect applied storage quirks
- Speed increases to dependency detection
November 22nd 2019
- Parted out some tests into separate variables -- cleaning up code/tests for upcoming system improvements
July 24th 2019
- Further improved SSD drive detection
July 8th 2019
- Improved drive detection for SSDs going through adapters
- Added detection of SSD adapters being used
- Improved Micro SD card type detection
July 5th 2019
- Further improved rootfs device and size detection
- Improved portability with non-Raspbian platforms
- Improved hdparm detection
June 30th 2019
- Improved rootfs device detection
June 27th 2019
- MMC storage is now correctly identified
- Improved CPU/core/memory clock detection in older Pis
- Improved Arch Linux support
- Improved system architecture detection
- Added several new SD and MMC manufacturers
- Fixed a portability with parsing dd test output
June 26th 2019
- Improved USB Flash drive detection
- Added Platinum manufacturer identification
June 22nd 2019
- Added Hama manufacturer identification
May 25th 2019
- Improved HDD and SSD identification including form factor, speed, size and class
- Added Lexar as SD manufacturer 0x00009e
May 4th 2019
- Added Sony as SD manufacturer 0x00009c
April 27th 2019
- Added cross platform CPU frequency detection to use if vcgencmd is not present
- Improved boot drive detection
- Added fallback for SD drivers that don't populate the udevadm information
- Added check to prevent installing iozone if it is already present on system
April 16th 2019
- Added "Team Group" as SD vendor (code -B, 0x000045)
- Added Maxell MicroSD vendor (code TI)
- Added fix to get gpu_freq on older Raspberry Pis that don't have core_freq
March 30th 2019
- Added x86_64 and x86 support
March 29th 2019
- Added Transcend to known vendors
- Eliminated wget dependency (uses pure curl for everything)
- Attempt to use native iozone package if available, otherwise build
March 18th 2019
March 17th 2019
March 16th 2019
Additional Models Supported