Raspberry PI Storage Performance: Part 1 USB vs SD Card

Recently I saw some discussion about storage performance on Raspberry PIs, with the focus being on performance between the MicroSD card vs. USB performance for the storage. This short series of BLOGs will compare several performance options for the Raspberry, PI, including the type of connection ( USB vs SD Card), Brand of SD Card ( two different U3 cards), and also the distro , comparing Raspbian vs the Oracle Linux distro and it’s UEK Kernel.

 

For this first test, let’s compare the performance with a MicroSD Card vs a USB3 device. For the comparison, I am using the gnome dish benchmark tool. It’s a quick any easy way to look at throughput and latency.

All test were with 1000 throughput samples, and 1000 latency data points with 10MB data sizes.

 

USB_rasp

When running against a USB SSD the system was able to sustain 34.8 MB/s on the read, and 35.6 MB/S on the write, with no significant variances in performance. Latency was on average .46 msec. Overall, not bad performance at all, for a PI.

 

Switching over to the microSD card, we see a much different result.

Microsd_rasp

Here, we really start to see the performance limitations of the SD card, with not only the performance degrading to 21.0 MB/s on read, but also 17.2 MB/s on the write, but more importantly the performance is not as stable, with a significant hit on the start, and towards the ends of the test we start to see the cache being unable to keep up, and performance drop to under 12 MB/s on reads and writes.

 

This is in part to several factors, mainly the quality of the SD card itself, as well as how I/O is managed on the PI. In theory, the USB is capable of over 640MB/s and the MicroSD interface 290MB/s, but due to device quality these results are rarely seen. Most MicroSD cards max out well under the performance seen with USB based SSDs, due to the difference in the I/O architecture between the devices. and from experience it is easier to find a reliably fast USB drive vs a Micro SD card.

SD cards are categorized based on their speed rating in various SD card classes. The most common ratings are as follows;

 

·                     Class 6, also known as V6 –  SD cards belonging to this class carry a writing speed of 6MB/s

·                     Class 10, also known as V10 and UHS-1  –  As the name implies, the cards own a writing speed of 10 MB/s, this is the slowest cards I personally use. UHS is a newer standard, focused on better performance.

·                     UHS-3, and V30  The cards of UHS 3 has a speed of 30 MB/s

·                     V60 –  Hard to find and more expensive these cards should support up to 60 MB/s

 

So this big question, USB drive of MicroSD. USB drives generally have better performance, due to the more advanced controllers in the SSD drives, as well as offering larger drive sizes. MicroSD on the PI has the advantage of being all internal, so not USB drive is flopping around, as well as offered decent performance when you do not need sustained I/O, or strong random I/O.  Personally, I use high0end SD cards due to price, but do use USB drives when running data intensive apps like databases.

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.