As all my devices with exchangeable storage use SD cards, every now and then I have to look for a new card. Unfortunately, even if you are only looking at the - in my opinion - two major vendors, Samsung and Sandisk, you have to choose between multiple series that even have a similar price. If you plan to use such a card in an embedded device like the Raspberry Pi, you can easily find several articles that are comparing those and cards from other vendors, e.g. this, this, this or this. However, the connection to the SD card reader is usually limited on such low-priced devices, hence those benchmarks will not tell you how the cards perform if the connection to the reader is not the bottleneck. In this article instead, I evaluated the following SD cards with a USB 3 card reader (Transcend TS-RDF8K) on my PC:

Samsung Evo Plus 11,49 € Amazon link
Samsung Pro Plus 17,99 € Amazon link
Samsung Pro 17,99 € Amazon link
SanDisk Ultra 11,99 € Amazon link
Sandisk Extreme 16,99 € Amazon link
Prices from 2016-08-28

One benchmark I used is iozone with the following parameters:

iozone -e -I -a -s ${datasize} -r 4k -r 512k -r 16M -i 0 -i 1 -i 2 -f ${device}

Instead of reading and writing from and to a file in a filesystem, I passed the device file (e.g., /dev/sdd) directly to the command in order to avoid uncertainties caused by builtin filesystem tasks. In the following, we see the results with a block size of 4kB. Such a small size is especially interesting for tasks that usually only read or write a small amount of data at once to different locations, e.g., log files or databases. In the figure, the first two columns show the performance measured in kB/s for reading and writing a 16MB file in 4kB steps to the card. The third and fourth column show the performance when reading and writing a total of 16 MB to random locations on the card. As we can see, the maximum performance in this scenario (below 13 MB/s) is far away from the values usually presented in advertisments (up to 90 MB/s) as the latter usually refers to the use case when reading or writing from or to subsequent locations. However, this is a good indicator how the card will perform as storage for the root filesystem of a operating system. According to this benchmark, the Samsung Pro Plus has the best read performance while the SanDisk Extreme has the best write performance to random locations.

Benchmark with a 4 kB block size

In the next figure, we see the performance of the cards when we use a block size of 16MB. In addition to the iozone benchmark, I added the results of measurements with the dd tool. In contrast to iozone, dd is a standard tool of the operating system to transfer data and, in this case, it is used to write an image of a root filesystem to the card. In addition to the required parameters, I added the conv=fdatasync parameter that ensures that dd only returns after all the data is actually written to the disk. If this parameter is not used, dd would return after the data is written to the buffer of the operating system. While the three Samsung cards again show the best performance for read operations, we can see that the two cheapest cards, the SanDisk Ultra and the Samsung Evo Plus, show the slowest write performance of the five cards. In this case the Samsung Evo Plus only achieves around 25 MB/s while the best card, the Samsung Pro Plus, almost achieves 80 MB/s.

As a third benchmark, I tested the performance of the cards when a database is writing to them. For this task, I used the sqlite benchmark from openbenchmarking.org to write 1000 entries into a new database on a new ext4 filesystem on the card. As we can see in the following figure, the SanDisk Extreme - that has also the highest performance for 4kB random writes - requires the least amount of time to accomplish this task followed by Samsung Pro Plus. An interesting observation during this benchmark was that the Sandisk Ultra, the Samsung Evo Plus and Pro show significant variation. The required time sometimes varied from 10 to 20 seconds between consecutive runs. Maybe the microcontroller in these cheaper, respectively older, cards has difficulties under some conditions to distribute the data in the internal storage. However, a real explanation requires further research.

As a last experiment, I measured the boot times of an RPiBuntu image with a Btrfs root filesystem on a Raspberry Pi 3. For this task, the time between the first U-Boot message and the message that the graphical login manager appeared over the serial port is measured from my desktop PC. In this case, the SanDisk Extreme and the Samsung Pro Plus are almost equally fast but the other cards slow down the boot time only by at most about 0.5s. This test is not as expressive for the performance of the cards as during a substential amount of the boot time, there is no access to the card, e.g., during initialization of the other hardware. Using an image that is optimized for a short boot time might reveal a higher difference between the cards. An interesting result of this experiment is that although the SanDisk Extreme was the slowest card during small random read tests, it is able to perform equally well as the Samsung Pro Plus that had the best read performance so far.

In conclusion, as always the best card depends on the use case, e.g., the filesystem that will be used and the access patterns. By looking at the raw performance values in this article, I would recommend the Samsung Pro Plus for reading or writing large files, e.g. in a camera, as it is a bit faster than the older Samsung Pro. As storage for the root filesystem, I would recommend the SanDisk Extreme as it showed a slightly better performance in the corresponding tests and it is also a bit cheaper than the Samsung Pro Plus. If you need a good general performance for a low price, I would recommend the SanDisk Ultra card as the Samsung Evo Plus has a low bulk write performance. If that is not an issue, e.g., if your device cannot write faster anyway or if you only read data for most of the time, e.g. watching videos from the disk, the Evo Plus would be the better choice.