Picking an SD card for a micro computer
SD or SDHC cards and their micro variants are very popular and can be found in tablets, mobile phones, cameras or in various micro computers like Raspberry Pi, where they are used to hold the whole operating system. In a common case, like in a camera the SD card must hold specific amount of pictures or movie of given length. It also have to save taken picture or movie stream fast enough to provide smooth operation. For microcomputers the requirements are different. We have a lot of files, many of which are small. For the computer to work smoothly the SD card must provide efficient random read and write capabilities - something that wasn't a goal for typical SD cards.
In this article I'll write a bit about SD card and their usage in Raspberry Pi or other similar computers (like Odroid-X2).
Introduction
Typical SD card is optimized for single file or movie stream operations. For holding an operating system with multiple files the performance may differ greatly and may not even get close to speeds given by the manufacturer. It's caused by usually slow random read and write operations that SD card have. As you can see on tomshardware.com SD cards test only some cards perform noticeably good in this category.
Linux operating system consists of many files of multiple libraries or Linux kernel. To boot the system a lot of files must be found and loaded or executed. Write operations don't happen as often, but for server, database operations or updates it's good to have efficient random write operations.
It's said that Sandisk SD cards are best in this category. Some Raspberry Pi users tested their SD cards and it seems like in general SanDisk cards are good. However for typical Raspberry Pi usage you won't notice a difference (unless it will be a server or a bunch of updates waiting for installation). There are also some compatibility issues that may come to play (like for SDHX, SDHC cards supporting even newer standards) so buying the fastest and most expensive SD card isn't a good choice for micro computers. You won't get that much performance boost (if at all) to make it worth the price.
SD card readers
For most microcomputers you will have to "burn" an operating system image on the SD card. It's something like copying a lot of data to the card. If the image is few GB in size it's good to make this process as fast as possible. We put the card in a card reader and start burning the image from our computer. It's easy, but when it comes to speed or reliability multiple factors come into play.
In some cases older card readers may have problems with correct burning of big images or with burning any image on a SD card supporting latest standards which aren't supported in the reader. This results in a successful burn but the system won't boot. This may happen often (I had this problem for Sandisk Extreme and big Linaro Ubuntu image). To solve this problem better card readers are needed. They won't cost much, they just must support the latest standards and be of good quality. I used Kingston USB3 reader and it solved my problems. You don't even need USB3, as USB2 is faster than nearly every SD card on the market (except theoretically some extreme SD cards marked at around 95 MB/s).
A quick test of read/write speeds
To compare read/write speeds on different readers for two cards (older and newer) I used Sony SDHC 8GB class 4 and Sandisk Extreme 16GB SDXC UHS-I class 10. The SanDisk card supports newer UHS-I standard allowing faster transfer when using higher clock frequency. The "class" marking says how many MB/s it should offer. So a class 4 gives 4 MB/s of read/write - in a specific test setup. Sandisk is class 10 so it gives 10 MB/s but with UHS-I standard that's even more (in this case 45 MB/s).
I used Linux and gnome-disk-utils to test the read/write performance of those cards in two readers. The test used 10 MB samples. The cards were connected to my laptop card reader (giving unbootable Linaro images), and to Kingston USB3 reader connected to USB2 and USB3 ports. The results are as follow:
As you can see the laptop (Asus N53S) card reader was the slowest, while Kingston was the fastest. USB3 gave the same transfer rates as USB2 - as the SD card wasn't fast enough to exceed USB2 60 MB/s limitation.
For a Sony SD card without UHS-I and other latest features there were nearly no noticeable difference:
Sony SD card gives results matching class 4 specification, and works equally well with both card readers.
Sandisk Extreme uses some newer standards. It's a SDXC card - a type of SD card allowing sizes up to 2 TB. UHS-I allows it to be operated at 100 MHz clock frequency (4 times higher than standard frequency), which gives faster transfer rates. The "older" laptop card reader probably does not supports that and the transfer rates aren't as high as with the Kingston reader.
Which SD should I pick?
Quick answer is: good brand, not very expensive and not very large (use a USB stick or external USB HDD for big storage).
You can fit Rasbian on a 4 GB SD card. Linaro images, like those for Odroid-X2 will require an 8 GB SD card. You can stick to the minimal or slightly bigger capacities and it will be an optimal choice.
As for Raspberry you also shouldn't pick the most bad-ass SD cards supporting high transfer rates. Raspberry has a SD card controller made by Arasan company (specification PDF, page 65) and this controller supports SD cards up to 3.0 version of that standard. Faster transfer rates like UHS-I showed up in 3.1 version of that standard. This means that the faster cards will work as plain class 10 cards in Raspberry. If you like hacking topics you can check this one about hacking the SD card driver in Raspberry to support higher clock frequencies.
SD cards alternatives
In general for micro computers using SD cards the system must be booted from the SD card (unless other options are supported). For Raspberry you can use berryboot and install the system on USB stick or USB hard drive. Cheaper and more efficient than a SD card.
eMMC
Some high end micro computers (like Odroid), tablets or ARM Chromebooks use eMMC cards. This type of cards uses 8 bit (and not 4 bit) interface to transfer data to and from the card. Thanks to that and few other things eMMC is vastly more effective than a SD card. Samsung even lists eMMC cards of class 1500. However you won't find an eMMC card in a shop near you. Those card are mainly for industry only. When you buy a micro computer that can use eMMC it's good to get the card and reader for it along with the computer.
Comment article