Raspberry Pi microSD card performance comparison - 2015

Variety of microSD cards tested with the Raspberry Pi model 2 B

This post's benchmarks were performed on a Raspberry Pi 2; for all the latest benchmarks, on Raspberry Pi 3 or later revisions, check out the official Pi Dramble microSD card Benchmarks page.

In my experience, one of the highest-impact upgrades you can perform to increase Raspberry Pi performance is to buy the fastest possible microSD card—especially for applications where you need to do a lot of random reads and writes.

There is an order-of-magnitude difference between most cheap cards and the slightly-more-expensive ones (even if both are rated as being in the same class)—especially in small-block random I/O performance. As an example, if you use a normal, cheap microSD card for your database server, normal database operations can literally be 100x slower than if you used a standard microSD card.

Because of this, I went and purchased over a dozen different cards and have been putting them through their paces. Here are the results of those efforts, in a nice tabular format:


Card Make/Model hdparm buffered dd write 4K rand read 4K rand write
OWC Envoy SSD (USB) 64GB 34.13 MB/s 34.4 MB/s 7.06 MB/s 8.20 MB/s
SanDisk Ultra Fit (USB) 32GB 31.72 MB/s 14.5 MB/s 4.99 MB/s 1.07 MB/s
Samsung EVO+ 32GB 18.45 MB/s 14.0 MB/s 8.02 MB/s 3.00 MB/s
Samsung Pro+ 32GB 18.46 MB/s 18.5 MB/s 8.10 MB/s 2.35 MB/s
Samsung Pro 16GB 18.39 MB/s 18.2 MB/s 7.66 MB/s 1.01 MB/s
Samsung EVO 16GB 17.39 MB/s 10.4 MB/s 5.36 MB/s 1.05 MB/s
SanDisk Extreme Pro 8GB 18.43 MB/s 17.6 MB/s 7.52 MB/s 1.18 MB/s
SanDisk Extreme 16GB 18.51 MB/s 18.3 MB/s 8.10 MB/s 2.30 MB/s
SanDisk Ultra 16GB 17.73 MB/s 7.3 MB/s 5.34 MB/s 1.52 MB/s
NOOBS (1.4, C6) 8GB 17.62 MB/s 6.5 MB/s 5.63 MB/s 1.01 MB/s
Transcend Premium 300x 32GB 18.14 MB/s 10.3 MB/s 5.21 MB/s 0.84 MB/s
PNY Turbo (C10 90MB/s) 16GB 17.46 MB/s TODO 6.25 MB/s 0.62 MB/s
Toshiba 16GB 17.66 MB/s 11.2 MB/s 5.21 MB/s 0.21 MB/s
Sony (C10) 16GB 15.38 MB/s 8.9 MB/s 2.47 MB/s 0.24 MB/s
Kingston (C10) 16GB 17.78 MB/s 9.0 MB/s 5.75 MB/s 0.21 MB/s
Kingston (C10) 8GB 12.80 MB/s 7.2 MB/s 5.56 MB/s 0.17 MB/s
Nasya C10 16GB 16.05 MB/s 8.4 MB/s 2.28 MB/s 0.38 MB/s
No-name (C4) 4GB 13.37 MB/s < 1 MB/s < 0.1 MB/s < 0.01 MB/s

After using most of these cards in different situations over the past year or so (some for Pis running MySQL, others for file shares, and yet others just doing data logging and web dashboard displays), I've also noted that reliability-wise, all of the 16 cards I've used so far (even the no-name C4 card) have been flawless.

However, judging by performance vs. price, there are a couple clear standout cards—one is the Samsung Evo+, which is the fastest card for random access by a mile. And this year, I've seen it on sale for $10-20 for 32 or 64 GB, so it's a steal. Other than that, I'd go with the SanDisk Extreme, as it can be had for about the same price, or the Samsung Evo (without the +), as it can be had for even less if you just need 8 or 16 GB.

2015 Winner: Samsung Evo+ 32 GB (purchased for $9.99 from Best Buy)

Benchmarks

hdparm buffered

sudo hdparm -t /dev/mmcblk0

Rationale: hdparm gives basic raw throughput stats for buffered reads (by the disk/device itself). You could also test with -T instead of -t to test the OS filesystem cache performance (which allows the OS to dramatically speed up certain read operations), but for our purposes we just want to test the device itself.

Setup:

  1. Install hdparm: sudo apt-get install -y hdparm

dd write

sudo dd if=/dev/zero of=/drive/output bs=8k count=50k conv=fsync; sudo rm -f /drive/output

Rationale: dd simply copies data from one place (if) to another (of). If your filesystem caches are big enough, this is a pretty poor disk speed comparison test. Because of that, make sure that count is set to a parameter large enough to cause the OS to actually write data to the drive (e.g. 50k 8k blocks ~= 400 MB, which shouldn't be able to be cached on a microSD card in a Pi!.

iozone 4K Random read/write

iozone -e -I -a -s 100M -r 4k -r 512k -r 16M -i 0 -i 1 -i 2 [-f /path/to/file]

Rationale: iozone is a very robust filesystem benchmark tool, which does a lot of useful tests that make sure you're getting a broad overview of read and write performance for a variety of block sizes and situations. I like the lower block size random I/O tests especially, because many operations (like logging data, writing a row to an ACID-compliant database, or bulk loading of data) require as fast of small-block-size random I/O as possible.

Most cheap microSD cards, even if rated as being 100MB/sec+ class 10 cards, can't sustain anywhere near that rate when writing random data—especially on the Raspberry Pi's measly data bus. (Note that most of the above benchmarks, when run on a USB 3.0 card reader on my MacBook Air, show 5, 10, or 15 times greater performance in that environment).

Setup:

  1. Download the latest version: wget http://www.iozone.org/src/current/iozone3_434.tar
  2. Expand the tarfile: cat iozone3_434.tar | tar -x
  3. Go into the src folder: cd iozone3_434/src/current
  4. Build the executable: make linux-arm
  5. Symlink the executable into your local bin folder: sudo ln -s /home/pi/iozone_434/src/current/iozone /usr/local/bin/iozone

More Information

Check out the source for these benchmarks (which is updated every few months as I test new cards and newer versions of Raspbian): microSD card benchmarks - part of the Raspberry Pi Dramble Wiki.

Comments

You can use dd with "conv=fsync" to make sure cache is flushed to disk before dd exits, therefore eliminating cache size as a variable. This is a more meaningful test than just cached dd, which doesn't really indicate anything.

Some preliminary testing indicates you're quite correct; sorry about that! I'm going to re-do all the dd tests and update this post and the Dramble Wiki page. Thanks for posting this comment!

[Edit: I've updated all the numbers in the post above.]

Jeff,

I was struggling in suggesting a good SD card for the new pi users, before I used to suggest top SD cards from amazon. But with this data, I can suggest a better card for them.

Do add an amazon link to buy.

Thanks for the research, Jeff.

Cheers
Suresh

Was the new Pi2 used or the original one? do they show different performance?

I've run all tests on a B+ and Pi 2, and almost all numbers were within a couple percentage points. Some sustained reads/writes were faster on the Pi 2 if caching was enabled (but I didn't include those results in these listings because they measure Pi performance more than SD cards).

Jeff,

Some random comments.. random read / random write are usually measured in kIOps;

I think when comparing media, the capacity (GB) is important.
Usually larger capacities (e.g., 16GB vs 32GB) use more flash dies, which means more operations can be performed in parallel. If you are comparing different capacities, you should include the capacity in the table.

--Keshet

Just a note - it's important to list the capacities. The same card model can perform differently at different capacity points :)

True, though I've found variation in random IO to be minimal. All are 16GB, except for a 32GB Evo+, and 8GB SanDisk Extreme Pro and Kingston C10.

Is there any relationship between the class of the SD cards and their speed in your tests?

Usually not. Class helps distinguish sustained read/write minimums, but says almost nothing about random IO performance, which is more important to usage in a Pi

It would be nice to see power cut tests on these as well. When using regular SD cards, we found most brands to eventually become corrupt in the card FTL.

Could you add the exact model of the cards? The marketing name are usually carried over several generations. When searching for SanDisk Ultra on Amazon you can get (for the 16 GB size) either SDSDQUAN-016G-G4A (rated with 48MB/s max speed) or
SDSQUNC-016G-GN6MA (rated 80MB/s), and the pictures seem identical (maybe a different shade of grey)...

Interesting results that I can confirm (sudo hdparm -t /dev/mmcblk0)

* Toshiba High Speed Professional SD-C016UHS1 @Pi2
Timing buffered disk reads: 54 MB in 3.04 seconds = 17.74 MB/sec

* Samsung Evo 16 MB-MP16DA/EU @Odroid
Timing buffered disk reads: 72 MB in 3.02 seconds = 23.88 MB/sec

I was surprised to read your comment that there was no difference in reliability between the cards. How long did you run reliability tests?

Weewx is software for weather stations, that writes to databases and logs about every 5 minutes. The cheap cards rarely survive more than a month or two. We don't know how long the best cards last, as after a year plus of testing, they are still going strong.

Did you run your tests that long?

-tk

For three cards, I have more than one year of continuous logging data (each Pi was using an Apple 5V USB power adapter): the Samsung 16GB EVO, the Transcend Premium 300x 32GB, and the Kingston C10 8GB. All three cards have performed flawlessly, writing a record into a MySQL database (that runs local on that card) every 30 seconds, 24x7.

I've also tested both the SanDisk Extreme and Samsung EVO for the past 3 months hosting http://www.pidramble.com/, on a 6-Pi2 cluster that runs Nginx, PHP, and MySQL. There are far fewer writes in that scenario, but logs are written to disk, and there's a small but steady amount of traffic to that site.

In all cases, I have not had any corruptions or failures with any of the cards. The only time I had any issue was with one SanDisk Ultra card, but I'm blaming that on a really flaky cheap micro USB power supply that I've since thrown away.

Interesting results, There's also this http://www.raspberrypi-spy.co.uk/2015/11/raspberry-pi-microsd-card-shoot...

I would like to see how the NOOBs and Toshiba cards would compare in your tests. The NOOBs is supposed to have decent 4k random r/w and the toshiba cards are pretty cheap compared to Sandisk/Samsung.

One problem with that test is that it didn't measure the cards being used from within a Pi itself (this can give vastly different results), and it also only ran the dd test (which tests large file write speed), but without the fsync option, which means buffering likely affected the results a little bit (made all the cards seem faster than they really were).

I've honestly never tried a Toshiba card, and haven't purchased a NOOBs card. Might need to pick one of each up :)

I have recently been doing some testing on microSDs for the Pis and have tested the Samsung EVO, Samsung EVO+ and the Samsung Pro Grade 3. I am not as savvy with the the testing tools, but one huge difference I noticed was the time it took to create the initial images.

Writing the stock Raspian Jessie image -
16gb EVO 5:51 min, ~ 12 MB/s
32gb EVO+ 3:11 min, ~ 22 MB/s
32gb Pro 1:19 min, ~ 63 MB/s!

I did run hdparm, and got near identical numbers -
16gb EVO 17.56 MB/s
32gb EVO+ 18.43 MB/s
32gb Pro 18.36 MB/s

I couldn't get iozone to run on the Pi, it compiled, but keeps saying the command isn't found.

I was able to run Crystal bench on them in a USB3 reader under Windows 7. A 1GiB sequential Read/Write with a 32 deep queue -
16gb EVO 46.77 MB/s and 12.61 MB/s
32gb EVO+ 89.21 MB/s and 30.38 MB/s
32gb Pro 90.24 MB/s and 77.28 MB/s
A big difference on the write side.

4k random with a 32 deep queue -
16gb EVO 4.34 MB/s and 0.72 MB/s
32gb EVO+ 5.38 MB/s and 0.93 MB/s
32gb Pro 5.70 MB/s and 2.30 MB/s
Another big increase on the write side.

The Samsung Pro has 2 versions, Grade 1 and Grade 3. I got the Grade 3 card at Microcenter for $16. The SKU number on my receipt points to this item, http://www.microcenter.com/product/455064/32GB_Class_10_Pro_Micro_SD_Car.... But the picture and model number are wrong, that is the Grade 1 card. The Samsung Model number for the grade 3 card is MB-MG32EA/AM. The packaging on both the grade 1 & 3 cards claims 90 MB/s and 80 MB/s, and the price was the same. So I opted for the grade 3.

Thanks for adding these data points! I'll try to get my hands on a Samsung Pro as well.

I would love to see the Samsung PRO tested with the original and comparable setup!

I have one on the way!

What was in the USB enclosures? (apologies if I missed it)

Only the Envoy USB SSD. All the rest were tested by flashing them with Raspbian Lite, booting the Pi from that card, then running the tests on the command line, one card after the other.

On my RasPi2 with jessie lite I have test a Samsung Pro 32GB Pro model MB-MG32EA/EU an get:

Iozone: Performance Test of File I/O
        Version $Revision: 3.434 $
Compiled for 32 bit mode.
Build: linux-arm

Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
             Al Slater, Scott Rhine, Mike Wisner, Ken Goss
             Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
             Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
             Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
             Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
             Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
             Vangel Bojaxhi, Ben England, Vikentsi Lapa,
             Alexey Skidanov.

Run began: Wed Dec  9 22:18:43 2015

Include fsync in write timing
O_DIRECT feature enabled
Auto Mode
File size set to 102400 kB
Record Size 4 kB
Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2 iozoneMB-MG32EA/EU.txt
Output is in kBytes/sec
Time Resolution = 0.000001 seconds.
Processor cache size set to 1024 kBytes.
Processor cache line size set to 32 bytes.
File stride size set to 17 * record size.
                                                              random    random     bkwd    record    stride                                   
              kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
          102400       4     2667     2769     8262     8258     8179     2410                                                               

iozone test complete.

Interesting... the 4k random write number you're getting with the 32 GB card is about double what I tested with the Samsung Pro 16GB. Now you're making me want to get a 32 GB Pro card to see if there could be that dramatic a difference between different sizes!

Testing Kingston 8 GB vs 16 GB of the same model/series, I didn't see a significant difference... but that was Kingston.

I tried my Iozone install on regular Raspian, I will retry on Raspian Lite. I am very interested to see exactly how much of a bottle neck the Pis i/o system is.

When testing the 32gb Pro on an i7 based desktop, in a USB3 reader, the 32gb Pro card produces results similar to a 7200rpm spinning disk on a SATA bus in Crystal Bench! But I don't expect the Pi to be nearly as efficient. Just like a fast SSD can saturate the bus, there is going to be a point of diminishing return. However I wonder if cpu power is the primary limiting factor on random access?

I got Iozone figured out, and am now a bit perplexed.

Here are some comparisons between a 32GB Samsung Evo+ and a 32GB Samsung Pro.

Write and Verify Raspian Lite image to cards.
EVO+
Write Image 1:01 - 23 MBs
Verify Image :30 - 45 MBs

Pro
Write Image  :21 - 68 MBs
Verify Image :31 - 45 MBs

No surprise the Pro wrote the image 3x faster, but the verify speed was a surprise.

CrystalDisk on the EVO+
http://haloxp.com/misc/Samsung_EVO_Red_32.png

CrystalDisk on the Pro
http://haloxp.com/misc/Samsung_Pro_32.png

CrystalDisk on a Western Digital Black 500GB SATA drive for giggles.
http://haloxp.com/misc/WD_Black_500.png

The sequential numbers are pretty much as advertised by the manufacturer.

Iozone on the EVO+ 32GB

Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2 iozoneMB-MG32EA/EU.txt
                                                    random    random
    kB  reclen    write  rewrite    read    reread    read     write
102400       4     1677     2873     7898     7895     7869     3153

Iozone on the Pro 32GB

Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2 iozoneMB-MG32EA/EU.txt
                                                    random    random
    kB  reclen    write  rewrite    read    reread    read     write
102400       4     2082     2380     7895     7849     7812     2370

Interesting the EVO+ leads 4k randoms on Iozone, but not CrystalDisk.

Somehow Samsung managed to make random write faster than sequential write..
Is someone fooling iozone again?
search for "Compatibility mode for 0xA5" in http://www.iozone.org/src/current/iozone.c

verify is likely doing somthing that is CPU bound (CRC check or somthing, i dont do linux so dont know what that test is) as both the EVO+ and the PRO+ have same read speeds when verifying

its interesting that the EVO+ is faster than the PRO+ in your tests, as the Pro+ is the faster model (even sold about 2x more £10 evo+ vs £20 Pro+ in the UK for the 32gb ones)

need to get Grade 3 class 10 Pro+ to see if they are any different (there might even be a difference between 32gb and 64gb in speed as well)

I haven't been able to find the Pro+ line on sale and in stock anywhere, but someday I'll find one and test it. All these cards are purchased out of my discretionary personal money :)

For Lexar, I've so far been incredibly unimpressed with every card I've used from them (same as Sony)—random I/O has always been abysmal, and I've decided to stop wasting $10 per card to test their cards, and won't be convinced otherwise unless/until they want to send me a free sample that's not terrible :)

Jeff: Thanks for the reply.

If you use Samsung's tool you can by them direct. Right now, at the time of this post, Best Buy online is running a fantastic deal on the Pro+ 128.

Cool! I ordered a 32GB Pro+ card, will add results when it arrives.

[Update: Added the results—it's disappointingly similar to the Evo+]

Do you have any experience using 128GB cards? I have seen various references that the Pi can be temperamental with 64GB+ cards, but wasn't sure how accurate that was?

Honestly, I haven't tried any cards larger than 32GB, just because 64/128GB cards are crazy-expensive (when you're like me, testing dozens and dozens of them gratis).

Ran 128 fine in previous B+'s I've had without any problems. I'm very interested to see if Samsung at CES bumps the Pro+ to 200GB or so to compete with Sandisk.

Hi, thanks for sharing the results!

I am thinking about getting a samsung evo+ or pro+. In your results (on raspberry hardware) the evo+ looks better. However other tests (on normal desktop pcs) show different results:
http://www.thessdreview.com/featured/samsung-pro-plus-microsdhc-32gb-and...

Could you please also measure the cards on a real linux host, to get a better comparison? This way we could say "okay on raspberry its different" and not "hm it might be tool related comparison".

Also another question:
Did you measure multiple times?
I also noticed a lot of speed differences between running the commands on the real tty1, a virtual terminal and via ssh. tty1 was the fastest of course.

Yeah it would be cool if you could give a bit more infos about those two models, since most people here who saw this on hackaday might now buy one of those two cards. And you know it makes a lof of difference, buying the right card.

Thanks!

A few follow-ups:

  • Yes, every test was run 4 times, with the first result discarded, and with a completely pure/clean fresh Raspbian Lite install straight to the card being tested, which was always in the microSD slot on the Pi (not in a USB card reader).
  • Every test was run straight from boot (after raspi-config was run and a reboot), on tty1 using a keyboard/monitor plugged straight into the Pi.

Either card would be great on a Pi, but you're correct in that some cards like the Pro+ may give better results on a fast desktop machine with a USB 3.0 card reader. I'll try to do some tests on my Mac when I get a chance, but no promises!

Thx for clarifying. I also have the same results as you wrote in the post. Very great card the Evo+! Thanks a lot for sharing!

I currently use a SanDisk 8gb Extreme Pro. Would I see much real world difference in openelec if I swapped to an Samsung Evo+

Only a little. The Extreme Pro is a pretty decent card.

As they are only a tenner I might give one a go. I'll report back.

Have you tried these tests while overclocking the SD card?

I don't have an evo+, but the evo is an absolute beast at 4k and is without a doubt a great card to use. Running at 100mhz and using the same parameters for iozone, I get 14,340kb/s random read and 4,366kb/s random write (4k). An absolute beast.

For uhs cards, you can try adding to your config

dtparam=sd_overclock=100

Although the signalling is still at 3.3v, youll get sdr50 speeds.

64gb evo gets 40mb/s read, 20mb/s write for sequential.

It looks like this change is also supported on the Pi 3 now (see also), so I'm going to do it and run some more tests, especially for write consistency and reliability. Thanks!

Indeed. May require an apt-get upgrade / rpi-upgrade for the dtparam to work. I did one out of the box yesterday and it works just fine. No need to download the sdtweak overlay.

Would be great to have these tested with the Raspberry Pi 3

I've updated the source benchmarks page where all these benchmarks are taken from: http://www.pidramble.com/wiki/benchmarks/microsd-cards — I've tested a number of the cards on the Pi 3.

I also found this benchmark (http://jgp.net/microsd-card-performance-raspberry-pi/) which also seems to indicate the Samsung are good bets.

Hi there
Ran your tests on my Toshiba Exceria 64Gb card (class 10, UHS-1) with my Pi3 overclocked at 100MHz. All results were competitive EXCEPT the 4k random write is atrocious
Toshiba Exceria 64GB 36.62MB/s 13.4MB/s 7.11MB/s 0.298MB/s
Based on your results have a 64GB Evo+ in the post as I use my Pi as my daily driver and have noticed occasional lags which I presume is the small file writes killing me.

I am interested in moving my ROOT partition to an external USB drive (most likely one of the nano/fit variants). It appears that the results of the Samsung Ultra Fit USB are worse than the EVO+ (which I am currently using). Will I see any performance gains using an external USB drive as my ROOT partiton on my RPi3 or is this a thing of the past that only applies to the RPi2?

Edit: I meant Sandisk Ultra Fit not Samsung, however, I am curious about the Samsung Fit as well. In fact, I'm open to suggestions about which would be the best nano/fit USB for the RPi3. Which one has the best random read/write performance. The Strontium Nitro looks promising...

Hi again

Got my Evo+ 64GB and it runs about the same results as your 32GB version. All results in my Pi3
Samsung Evo+ 64GB (stock speed) 21.64MB/s 16.1MB/s 9.653MB/s 3.361MB/s
Samsung Evo+ 64GB (100MHz) 40.29MB/s 20.2MB/s 12.371MB/s 3.584MB/s

So delighted with far better 4k write times and can notice a much more snappy system.