Benchmarking microSD cards and more

It’s worth re-visiting this blog-post as I am going to do more benchmarks and add more results over time.

Motivation

If you ever tried using a flash drive (such a SD, microSD, USB drive or CF) for your root or home filesystem on a small computing device or smartphone, you probably have noticed that flash cards are in most cases a lot slower than integreted eMMC flash. Since most filesystems use 4k blocks, the random write/read performance using 4k blocks is what matters most in such scenarios. And while flash cards don’t come close to internal flash in these disciplines, there are significant differences between the models.

Jeff Geerling [1,2] has already benchmarked the performance of various microSD cards on different models of the “blobby” Raspberry Pi. I had a number of different microSD cards at hand and I tried to replicate his results on my sample. In addition, I extended the comparison to regular SD cards and USB drives.

Disclaimer


All data and information provided in this article is for informational purposes only. The author makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this article and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.

In no event the author will be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this article.

Environment and tools

I encourage every reader to replicate my benchmarks and share their results. Therefore, I first want to describe how the measures were taken.

General equipment

For the benchmarks, I used the following hardware on my workstation (listing only relevant parts):

  • Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)
  • Logilink CR0034A USB 3.0 card reader [5], used for (m)SD cards
  • Apacer ? USB 2.0 card reader, used for CF cards
  • Debian 9 “Stretch”

In the past, I also did iozone benchmarks using a Logilink CR0015 USB 2.0 (m)SD card reader [4] which are provided at the end of the article for reference.

iozone Benchmarks

For the first tests, Just like Jeff, I used the open source (but non-free) tool “iozone” [3] in the current stable version that is available on Debian Stretch (3.429).

I disabled caches and benchmarked on raw devices to avoid measuring filesystem overhead. Therefore, I used the following call to iozone to run the benchmarks (/dev/sde is my sdcard):

$ iozone -e -I -a -s 100M -r 4k -r 16M -i 0 -i 1 -i 2 -f /dev/sdX

(replacing sdX by the actual device name)

ddrescue benchmarks

I used GNU ddrescue (1.21) in synchronous mode to overwrite a device with zeroes and measured the performance there. For this purpose, I used the following call to do a write benchmark:

$ ddrescue -D --force /dev/zero /dev/sdX

(replacing sdX by the actual device name)

Similarly, to measure the read performance I used (I had more than 100GB RAM left for tmpfs):

$ ddrescue -D --force /dev/sdX /tmp/foo

(replacing sdX by the actual device name)

Results

iozone

Here are the iozone results:

Manufacturer Make / model Type Speed Class Capacity 16M seq. read (MB/s) 16M seq. write (MB/s) 4K rand. read (MB/s) 4K rand. write (MB/s)
Samsung Pro+ (2017) mSDXC U3 64 GB 42.33 39.75 8.83 2.39
Samsung Evo+ (2017) mSDXC U3 64 GB 42.47 40.10 8.48 2.29
Samsung Evo+ mSDHC U1 32 GB 42,53 34,48 8.01 3.97
Sandisk Ultra mSDXC C10 64 GB 18.21 19.19 5.35 1.06
Sandisk Cruzer USB 2.0 4 GB 22.89 4.05 6.86 0.44
Kingston Data Traveller G3 USB 2.0 8 GB 21.52 4.96 6.96 0.08
Super Talent Pico C USB 2.0 8 GB 36.72 13.77 DNF DNF
Sandisk Ultra USB 3.0 32 GB 6.41 2.27 148.46 52.97
Samsung ? USB 2.0 1 GB 21.48 13.47 11.10 0.23
Transcend ? CF 80x 1 GB 20.19 12.56 7.56 0.19
Data Power ? (SLC) CF ? 1 GB 12.91 4.97 6.45 0.003
Toshiba ? CF ? 256 MB 7.52 2.86 3.78 0.003
Samsung Evo SDHC U1 32 GB 9.29 4.01 46.34 17.50
? mSDHC ? ? 8 GB tbd tbd tbd tbd

ddrescue

Here are the results using the USB 3.0 card reader or the device directly (for usb drives):

Manufacturer Make / model Type Rating Capacity Avg read (MB/s) Avg write (MB/s)
Samsung Pro+ (2017) mSDHC U3 64 GB tbd 34.77
Samsung Evo+ mSDHC U1 32 GB 41.95 21.54
Sandisk Cruzer USB 2.0 4 GB 36.37 2.64
Super Talent Pico C USB 2.0 8 GB 36.29 19.80
Sandisk Ultra USB 3.0 32 GB 115.00 24.62
Samsung ? USB 2.0 1 GB 21.63 14.62
Kingston Data Traveller G3 USB 3.0 8 GB 20.64 5.07
Transcend ? CF 80x 1 GB 19.26 12.60
Data Power ? (SLC) CF ? 1 GB 12.68 5.02
Toshiba ? CF ? 256 MB 7.33 2.82
Samsung Evo SDHC U1 32 GB 45,39 19.39
? mSDHC ? ? 8 GB 15.64 5.45

Legacy USB 2.0 iozone results

Previously, I ran the iozone benchmarks using the USB 2.0 card reader. They might be relevant, if you are looking for a storage device which you want to put in a computing device with a slow card reader:

Manufacturer Make / model Type Speed Class Capacity 16M seq. read (MB/s) 16M seq. write (MB/s) 4K rand. read (MB/s) 4K rand. write (MB/s)
Adata ? mSD C4 32 GB 9.58 2.97 2.62 0.64
Samsung Evo mSDHC U1 32 GB 17.80 10.13 4.45 1.32
Samsung Evo+ mSDHC U1 32 GB 18.10 14.27 5.28 2.86
Samsung Evo+ (2017) mSDXC U3 64 GB 16,98 8,03 7,99 2,99
Sandisk Extreme mSDXC U3 64 GB 18.44 11.22 5.20 2.36
Sandisk Ultra mSDHC C10 64 GB 18.16 8.69 3.73 0.80
Toshiba Exceria mSDXC U3 64 GB 16.10 6.60 3.82 0.09
Kingston ? mSD C4 8 GB 14.69 3.71 3.97 0.18

Verdict and future work

I can confirm Jeff’s results about microSD cards and would also recommend the Evo+ (both the old and the 2017 model) which have the best 4K random write performance of the sample. On the other hand, I am very disappointed about the Toshiba Exceria card. Actually running a device on this card with a very sluggish performance was the reason why I took this benchmark initiative. And indeed, after switching to the Evo+, the device feels much snappier now.

Of course, it would be worthwhile to add more cards and drives to this benchmark. Also, using fio instead of the non-free iozone might be interesting. Furthermore, doing the benchmarks internally on the device or using a other USB 3.0 card readers might be also interesting.

References

[1] http://www.pidramble.com/wiki/benchmarks/microsd-cards
[2] http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-microsd-card
[3] http://www.iozone.org/
[4] http://www.logilink.eu/Products_LogiLink/Notebook-Computer_Accessories/Card_Reader/Cardreader_USB_20_Stick_external_for_SD-MMC_CR0015.htm
[5] http://www.logilink.org/Produkte_LogiLink/Notebook-Computerzubehoer/Kartenleser/Cardreader_USB_30_SD-SD-HC-Micro_SD-Micro_SD-HC_CR0034A.htm?seticlanguage=en