Shell-based benchmarking suite for NVMe storage on Raspberry Pi 5. Tests sequential throughput and random IOPS using dd and fio, and saves results for comparison across runs or hardware changes.
Built and tested on a Raspberry Pi 5 with a PCIe NVMe SSD.
| File | What it does |
|---|---|
Storage/nvme_benchmark.sh |
Runs sequential and random I/O tests using dd and fio |
Storage/nvme_benchmark_results.md |
Example results from a Raspberry Pi 5 with a 1TB NVMe SSD |
- Raspberry Pi 5 (or any Linux system with an NVMe drive)
fioinstalled:sudo apt install fio- At least 2GB free space in the test directory
sudoaccess (needed to drop disk caches between tests)
git clone https://github.com/cdlowe3/System-Performance-Benchmarks.git
cd System-Performance-Benchmarks/Storage
./nvme_benchmark.shThe script defaults to /tmp/nvme_benchmark/ as the test directory. If your NVMe is not your root filesystem, edit TEST_DIR at the top of the script to point at a path on your NVMe mount point (e.g. /mnt/nvme/benchmark).
- 1GB sequential write — large-file write throughput
- 1GB sequential read — large-file read throughput
- 100MB random write — entropy-based write using
/dev/urandom
- 4KB random read IOPS — small-block read performance, relevant to databases and OS responsiveness
- 4KB random write IOPS — small-block write performance
- 1MB sequential read — streaming read throughput
- 1MB sequential write — streaming write throughput
- Mixed workload (70% read / 30% write) — general-purpose simulation with 4 parallel jobs
All fio tests run for 30 seconds with direct I/O (bypasses page cache) for accurate measurements.
Results from a Raspberry Pi 5 running Raspberry Pi OS (Bookworm) with a PCIe 3.0 NVMe SSD. See Storage/nvme_benchmark_results.md for full output.
| Metric | Result |
|---|---|
| Sequential Read (dd) | 3.2 GB/s |
| Sequential Write (dd) | 3.5 GB/s |
| Sequential Read (fio, 1MB) | 4.3 GB/s |
| Sequential Write (fio, 1MB) | 3.0 GB/s |
| Random Read IOPS (4KB) | 420,000 |
| Random Write IOPS (4KB) | 332,000 |
| Metric | Good | Excellent | Exceptional |
|---|---|---|---|
| Sequential Read | >500 MB/s | >1 GB/s | >3 GB/s |
| Sequential Write | >400 MB/s | >800 MB/s | >3 GB/s |
| Random Read IOPS | >10K | >50K | >300K |
| Random Write IOPS | >5K | >30K | >300K |
- Disk caches are dropped between tests using
/proc/sys/vm/drop_cachesfor consistent measurements. - Test files are removed automatically after each run.
- The
libaioengine used by fio requires Linux. This script will not work on macOS.
- Raspberry Pi 5 Model B Rev 1.1 running Raspberry Pi OS (Bookworm)
- 1TB NVMe SSD via PCIe M.2 HAT