Benchmarking microSD cards

Motivation

If you ever tried using a microSD for your root or home filesystem on a small computing device or smartphone, you probably have noticed that microSD 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 microSD 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.

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 we 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

Just like Jeff, I used the open source (but non-free) tool “iozone” [3] in the current stable version that is available on Debian Jessie (3.429). Instead of using a Raspberry Pi, I used a cheap microSD/SD-USB2.0-adapter made by Logilink [4] connected to a desktop pc.

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 512k -r 16M -i 0 -i 1 -i 2 -f /dev/sde

Benchmarked microSD cards and results

The following table provides the results I obtained (rounded to 10kb/s):

Manufacturer Make / model Rating Capacity 16M seq. read (MB/s) 16M seq. write (MB/s) 4K rand. read (MB/s) 4K rand. write (MB/s)
Adata ? C4 32 GB 9.58 2.97 2.62 0.64
Samsung Evo UHS-1 32 GB 17.80 10.13 4.45 1.32
Samsung Evo+ UHS-1 32 GB 18.10 14.27 5.28 2.86
Sandisk Extreme UHS-3 64 GB 18.44 11.22 5.20 2.36
Sandisk Ultra C10 64 GB 18.16 8.69 3.73 0.80
Toshiba Exceria UHS-3 64 GB 16.10 6.60 3.82 0.09
Kingston ? C4 8 GB 14.69 3.71 3.97 0.18

Discussion, conclusion and future work

I can confirm Jeff’s results about microSD cards and would also recommend the Evo+ which has 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.

I think it would be interesting to add more cards to this benchmark (not only microSD but also regular SD cards and maybe also CF cards). Also, using fio instead of the non-free iozone might be interesting. Furthermore, doing the benchmarks internally on the device or using a faster USB 3.0 card reader 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