Raspberry Pi Storage Benchmarks + Benchmarking Script

Pi Benchmark 2019 Contenders
Pi Benchmarks 2019 Contenders

Storage options continue to advance at a very fast pace. We’ve seen a lot of changes in the past couple of years with viable storage options for your Pi. Solid state drives are now so cheap that it can be cheaper to outfit your Pi with a SSD than buy a MicroSD card! MicroSD cards also continue to evolve with the new “Application Class” A1 and A2 certifications.

This year I wanted to do something more than just benchmark my ever-growing pile of MicroSD cards and solid state drives. Although I have a wide variety of storage to test I don’t have everything! So this time I created a benchmark that gives you a easy to compare score and anonymously submits the storage specifications and the results to this site.

Running the benchmark is extremely easy. Run the following command on your Pi:

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

Current Benchmark Results

Pi Benchmarks – Raspberry Pi Storage Benchmarks

The 2022 storage benchmarks are now available!

Navigating the Results

As the list of submissions continues to grow there can be a lot of data to sift through. I’ve provided a filter on the table to help narrow some of that down.

To only see Micro SD cards click the “Product” drop down from the options above the table and choose “SD”. This will filter out everything but Micro SD cards. To see solid state choose “SSD”. You can also search by manufacturer, brand, etc.

I have also offered the option to export the entire results table to Excel and other formats. If you perform any advanced analysis that you think would be useful to share be sure to leave a comment with what you found and I will credit you and post it for everyone!

Scoring

The benchmark heavily favors 4k random reads / writes. This is because for application and operating system performance this is by far the most important metric. Traditional benchmarking methods like dd write, hdparm read tests, etc. are very poor indicators of everyday performance. What matters is not how fast your storage can push through giant files but how fast it can respond to random input that asks it to read / write anywhere on the disk.

To understand why we need to think of what your Raspberry Pi is usually doing. Most applications and services are not constantly writing giant sequential files which is what traditional synthetic benchmarks measure. Your Raspberry Pi is usually updating log files, reading data from different parts of the disk for various applications and services, responding to user input, etc. To your disk drive this behavior is considered “random” since it has no idea what it will be asked to read / write next.

Storage devices doing large sequential I/O like transferring files utilize extensive caching and other techniques to speed up these kinds of operations. Unfortunately these techniques do not work when the operating system and storage device doesn’t know what users / applications / services might request next. The storage device has no way to know or prepare for what your application will want next so it has to read it raw from the disk and can’t rely on cache.

This is why in our benchmarking we want to look very hard at 4k random read / writes. This is what will determine how “snappy” the Pi feels as you perform various tasks. Fast 4k random IO devices feel and perform much better than a device with huge throughput but poor random I/O performance.

The current scoring method is:

(DDWriteSpeed * 1024 + fio4kRandReadIOPS * 4 + fio4kRandWriteIOPS * 10 + io4kRead + io4kWrite + IO4kRandRead * 4 + IO4kRandWrite * 10) / 100

Methodology

The benchmark runs a few different tests in order to get a good overall idea of storage performance. It runs 4k read / write and random read / write in two separate benchmarks to verify the results and reduce variance. Here are the tests used in the benchmark:

FIO – An industry standard used for true storage benchmarking vs. just measuring throughput (like DD Write and HDParm — not considered true benchmarks). The benchmark tests 4k block size sequential read/write and random read/write. Gives a result in IOPS which stands for Input/Output Operations Per Second

IOZone – A very popular benchmarking program. We also test 4k block size sequential read / write and 4k random read / writes here to verify our results are close to the FIO results

DD Write – Basic throughput test of writing 0’s as fast as possible

HD Parm – Tests disk read throughput in direct mode (avoids caching)

Recommendations

The top recommendation this year for Pi storage will depend on your form factor. Let’s break it down:

My project is stationary (servers, media centers, etc.)

The best choice is a 2.5″ Solid State drive connected via USB. This is the highest performance choice and is very cheap.

If you have a Pi 3B+ or older the benchmarks show that any solid state drive is so fast that it maxes out the Raspberry Pi’s USB 2.0 bus. I’ll talk about this more in the SSD analysis section below but basically it’s best to get the cheapest option while still picking a reliable brand.

If you have a Pi 4 then the performance of the solid state that you get is a performance factor. Differences between drive quality can affect performance but the performance of *any* quality solid state drive is going to crush SD cards and USB flash drives.

The best way to find good fast drives is to go to the full Pi Storage Benchmark results and soft by drive and see which ones score higher and by how much. When you look at prices you can determine if you want to pay extra for the highest classes of performance and where your sweet spot is.

The new Pi 4 has a much faster USB 3.0 bus on it that allows solid state’s potential to be unleashed leading to huge performance gains.

Here is my current recommendation:

Kingston A400 SSD
Kingston A400 2.5″ SATA SSD

The Kingston A400 has been a great drive to use with the Pi for years. It’s reliable, widely available around the world, has low power requirements and performs very well. It’s also very affordable. This drive has been benchmarked over 1000 times at pibenchmarks.com and is the #1 most popular SSD among the Pi community!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

StarTech 2.5" SATA to USB 3.0/3.1 Adapter
StarTech 2.5″ SATA to USB 3.1 Adapter

The USB 3.1 variant of the StarTech 2.5″ SATA adapter works well with the Pi 4. The USB 3.0 variant doesn’t have firmware updates available and is not recommended.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

My project moves around but can fit a USB drive

Many USB drives are a poor choice for Pi storage media because they have very poor 4k random read / write performance. Micro SD cards are faster than a run of the mill / genreic flash drive.

That being said, with the new Raspberry Pi 4 the USB 3.0 bus is having really high end flash drives outperforming Micro SD cards. On the 3B+ and older boards without the new bus USB flash drives are usually not a good choice (even the good ones).

One drive that shows great performance even on a 3B+ is a special USB drive by SanDisk that is actually a solid state drive on a stick. It has the same size / dimensions of a regular flash drive but uses solid state storage internally giving it great 4k random read / write performance. I own it and it benchmarked at 2330 putting it more than double any MicroSD card and only a couple hundred points below Samsung Pro 2.5″ SSDs.

SanDisk Extreme Pro USB SSD
SanDisk Extreme Pro SSD

The SanDisk Extreme Pro USB SSD is a true solid state drive. This is different than a typical “flash drive” which uses extremely cheap memory and has very low random I/O performance/throughput compared to a real solid state drive. I’ve used both the USB 3.1 and USB 3.2 variants with the Pi successfully and they benchmark very well!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

My project is small form factor and can’t use USB adapters or storage

There’s lots of cool projects out there that using any type of USB attached storage is not an option. For these projects Micro SD is still king. The good news is that Micro SD has had some recent developments such as the A1 / A2 application class cards. A2 is not supported by Raspberry Pi yet (or almost anything else really) so A1 is the important mark to hit.

I’ll cover Micro SD in depth in the Micro SD analysis section but here is the current recommendation:

SanDisk Extreme A1
SanDisk Extreme A1

The SanDisk Extreme A1-A2 SD card has the best scoring SD card on Pi Benchmarks for years and is second in popularity only to the SanDisk Ultra (often included in combo kits). The application class (A1) means random I/O speeds (very important when running an OS) have to meet a higher standard. There’s no benefit on the Pi for A2 right now so get whichever is cheaper/available.

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

The SanDisk Extreme A1 Application Class version continues to dominate other Micro SD cards on the benchmarking charts.

SSD Analysis

SSD benchmarking so far has shown that there is not much of a difference between an older cheap SSD like a outdated mSATA Hynix drive and top of the line drives like the Samsung 850 Pro. The difference from the oldest cheap drives and top of the line was only about 100 points.

This is because the Pi has a USB 2.0 bus. Even the slowest oldest SSDs are so fast that they hit the maximum possible data transfer rate over USB 2.0. Because of this it makes sense to buy the cheapest SSD drive possible that is still reliable. See my recommendations section for ideas.

Micro SD Analysis

The Micro SD market has always been a difficult place for Raspberry Pi owners. Since there traditionally was no classification that indicated random read / write performance we simply had to buy different cards and benchmark them.

The problem with that was that Micro SD manufacturing processes change. They can even change from batch to batch. The 2015 Samsung Evo cards were a good example of this. We found a card with amazing 4k random read / write performance but one day they changed their process and the new ones are not even close.

Fortunately things have recently improved for us somewhat because of, well, smartphones! Let’s talk about the application class.

Micro SD A1 / A2 Application Class

Application class cards were created because smartphones have become one of the top use cases for SD cards. Many people run applications directly off their SD card or have applications that keep their active storage on there. Tech savvy smartphone users sick of slow performing cards demanded a speed class was created to measure this type of performance.

This is great for us Pi owners because this type of use is 4k random reads / writes and is exactly the same as what we do on the Pi. Thank you smartphone owners!

It’s important to note that right now the Pi (and pretty much everything else) cannot currently make use of the new A2 standard as it requires special driver support to take advantage of the new features. I have benchmarked both the SanDisk Extreme and the SanDisk Extreme Pro A2 cards in my benchmark results and they did not perform any better than the A1 cards because of this.

Lets look at the application class performance features:

Application Class Performance Chart
Application Class Performance Chart

The new A1 application cards are fantastic and performing very well on the benchmark. So far every application card benchmarked has hit the minimum A1 targets. If you are looking for a better performing SD card then A1 is the way to go.

Video Class (V30, etc) and U Class (U1 and U3)

These don’t matter for the Pi. Basically at all. They are measurements for maximum sequential I/O throughput. For example if you have a video camera that needs to record in 4k it will need a very high sequential I/O maximum transfer rate.

The Pi depends on 4k block size random I/O as I’ve explained in earlier sections and these classifications don’t measure that. Indeed, my 3 worst performers on the benchmark are all U1 cards and got easily stomped (nearly doubled in score) by a SanDisk Ultra Class 10.

This doesn’t mean U capable cards are bad. The Samsung Pro+ is a U1 class card and performed incredibly well on the benchmark. It just means that the Samsung Pro+ has much higher quality memory / a better controller inside it.

The conclusion is that unlike the application class these classifications will not tell you if your card is going to be good or awful for the Pi. You need to benchmark them to know!

Picking the Fastest Micro SD Card

This can be difficult as manufacturers change their manufacturing processes and start using a different type of memory or on-board storage controller (likely to a cheaper one) for these cards. This can even happen on the same product line (such as the Samsung Evo) so manufacturer date is important when looking at these.

For example, the Samsung Evo+ was terrible a few years ago but more recent batches are scoring very well. The Samsung Evo “orange” older cards tend to be faster than the newer ones.

This is a big reason why I created this benchmark. With a bigger sample size of cards we as a community can pool our card benchmarks together and figure out which manufacturers and lines of cards are getting the good memory / on-board storage controllers.

Since manufacturers change their processes all the time to keep up we will need to watch the benchmark results and see where the “good stuff” is going and when the card quality quietly changes!

If you are currently in the market for a Micro SD card check the recommendations and the results table to see which current batches are performing the highest!

How you can contribute

The best way to help contribute to this research is to run the benchmark on your own Micro SD cards.

We are especially looking for the more unusual Micro SD card brands. Right now there are several manufacturers of Micro SD cards that have as yet to be identified. This information isn’t published anywhere publicly so the only way we can get them is through benchmarks submitted by you!

It is important to fill out everything you can see for the “Brand” question that comes up when you run the benchmark. Look at your card and fill in any branding markings you see.

This helps me identify unusual card vendors and add them to the script so they can be identified to help everyone compare between the different cards.

Conclusions

  • Use a solid state drive (SSD) if possible. Instructions on how to set one up with the Pi are in this article
  • SanDisk A1 application class cards are dominating the Micro SD results so far
  • The only sensible Micro SD cards to buy right now are application class (A1) due to their outstanding 4k blocksize I/O performance vs. older cards.
  • Micro SD card performance among the same brands and even the same models varied wildly depending on the manufacturing date. Memory quality and storage controller performance vary from batch to batch. Generally the newer they are the higher they tend to score on the benchmark as card technology is always improving.
  • The Pi cannot utilize A2 so don’t pay extra for it (although sometimes the A2 versions are cheaper). A2 cards will run in A1 mode on the Pi.
  • USB flash drives are terrible choices for Pi storage
  • Old “spinny disk” 5400 RPM and 7200 RPM HDDs underperform decent Micro SD cards

With the new benchmark we should be able to learn a lot more about storage on the Pi. Micro SD cards seem to be the area we need to learn the most about. As more people run the benchmark we’ll continue to analyze and revise recommendations based on what everyone finds!

Subscribe
Notify of
guest

85 Comments
Inline Feedbacks
View all comments
knosso
knosso
1 year ago

Amazing tool, extremely useful. Thanks for providing this service to the community.

baijorge
baijorge
3 years ago

Hi James! First of all, nice job with your site, It´s the reference for all the people looking for good options on storage.

Well, I have been running the script to get the results of my WD_Black SN750 running on a MirkoPC with Raspberry Pi CM4 (Overclocked to 2147 GHz) but I don´t see the result (19207) on your site.

Maybe I did something wrong?

sennai
sennai
3 years ago

Hello, Thanks for developing this test tool.
My result numbers are very different compared to the Actual file transfer speed with SFTP tools (actual is 13 to 14MB/s), with various file types & sizes. What am I not doing right?

Result from your tools is below.
Category Test Result
HDParm Disk Read 282.78 MB/s
HDParm Cached Disk Read 245.26 MB/s
DD Disk Write 176 MB/s
FIO 4k random read 11466 IOPS (45867 KB/s)
FIO 4k random write 7816 IOPS (31267 KB/s)
IOZone 4k read 25375 KB/s
IOZone 4k write 24770 KB/s
IOZone 4k random read 21221 KB/s
IOZone 4k random write 31930 KB/s

Cheers.

ken hughsdgit
ken hughsdgit
3 years ago

hi james passed 13000 score mark with a ORICO M2PAC3-G20(ASM2364) + Samsung 980 Pro 1TB
vanilla config yields 9000-10000. aside from a good power supply, cooling, CPU overclock, and modest power consumption reductions (no keyboard use uart) most gains come from software.

some of these seemed helpful:
-rootfs on xfs partition with some options (defaults,noatime,nodiratime,logbufs=8,logbsize=256k,largeio,swalloc,inode64,allocsize=1g)
-total_mem=1072
-echo none > /sys/block/sda/queue/scheduler
-echo 4096 > /sys/block/sda/queue/read_ahead_kb

Harry
Harry
3 years ago

Hello,
please delete Benchmark #38293.
I thought it would already boot from SSD but it did boot still from SD (SanDisk Ultra 32 GB).
The benchmark #38294 is the correct one with respect to the Note.

Thanks

Andrew
Andrew
3 years ago

Amazing article and storage performance database! Thank you very much for your excellent work and all the best for 2021!

Ondra
Ondra
4 years ago

Hi,
already on the 3rd day I try to upload the results to the server but it only loaded me after the first test only the SD card on the Raspberry Pi4. Do you have an outage? Or how many hours does it take for the result to appear on the web?

Thanks

Category test result
HDParm disk read 146.43 MB / s
HDParm disk read with 137.27 MB / s cache
DD Disk Write 123 MB / s
FIO 4k random reading 5056 IOPS (20227 KB / s)
FIO 4k random 5419 IOPS (21677 KB / s)
IOZone 4k reads 25187 kB / s
IOZone 4k entry 17711 KB / s
Random reading IOZone 4k 17413 kB / s
Random entry IOZone 4k 22883 KB / s

Score: 5417

Compare with previous comparative results on:
https://pibenchmarks.com/

Ondra
Ondra
3 years ago

HI James,
Thank you, it’s a standard Samsung EVO 860 250GB, today I’m going to do more tests.

Ondra
Ondra
3 years ago

It already recorded my test. Don’t you have any protection there so that you can’t do 5 tests in a row in one day or in a month?