Many types of Secure Digital (SD) cards exist to fit many different purposes. This article aims to help one spotting the differences and the way they are advertised to finally pick the SD card that will fit a given device (more specifically a Raspberry Pi).
Basics of SD cards
SD cards exist in various formats, namely regular, mini and micro.
The format doesn't mean anything in terms of capacity (how much it can hold) and speed (how fast it reads and writes data).
Checking the capacity is trivial, the size is most of the time given in GB and may vary from a few GB to hundreds (and so does the price).
The trickier part is about speed: it is actually not precise enough, we should rather talk about:
![]() |
| From top to bottom: regular, mini and micro sizes |
Checking the capacity is trivial, the size is most of the time given in GB and may vary from a few GB to hundreds (and so does the price).
The trickier part is about speed: it is actually not precise enough, we should rather talk about:
- Reading speed
How much data per second an SD card can read - Writing speed
How much data per second an SD card can write - Read access latency
How much time it takes an SD card before it can read data - Write access latency
How much time it takes an SD card before it can write data
Reading and writing speeds can be spotted via the following properties:
- Speed class
It is simply the minimum writing speed an SD card can perform. The higher the faster, knowing it is expressed in MB, e.g. a class 6 SD card will never write non-fragmented data slower than 6 MB per second. This may change if the data written is fragmented, e.g. being many small files instead of a single one. - "x" rating
Quoting wikipedia:
The “×” rating, made obsolete by speed classes, is a multiple of the standard CD-ROM drive speed of 150 KB/s (approximately 1.23 Mbit/s)It is to be read carefully though: there is no rule regarding what it refers to, e.g. from a vendor to another it could be an average reading speed, the best reading speed, the best writing speed, or any combination of the above.
As most of the times (not to say always), a card will read data faster than it writes, it is safer to assume the "x" rating refers to the average reading speed rather than anything else.
Read and write access latencies however cannot be spotted that easily, and you'll have to dig into the vendor documentation to check those details, if provided.
That's very unfortunate though, because this is what we need to pick the right SD card for our Pi, which leads to the next section.
Which SD card for my Pi?
Most of us would think "I'll take the fastest one" (commonly class 10 on the paper) to get the best results.
If you've read and understood the previous section then you may think this could be wrong: the class (and in a certain way the "x" rating as well) gives an I/O rate, i.e. how fast the card is to read or write data.
However, before getting into this I/O you need to access the card and this takes a certain amount of time, and this time is not represented by the class neither the x speed.
This might not be big deal when it comes to read or write big chunks of data: the access latency would be negligible compared to the time it takes to write the data. However this latency would add up for each access the cards makes, so when it comes to access very small files, it may take ages even if the SD card is class 10.
Let's take a simple example with a class 10 SD card which would have a 1 second write access latency.
Class 10 means it can write 10 MB/s, i.e. it can write 10 GB (=10240 MB) of data in 10240/10=1024 s.
1 s latency means it will take the card 1 s each times it will begin to write a single file.
Write access latency adds up as follow:
Conclusion: when it comes to manipulate small files, like Linux does, or like your MP3 collection is, the shorter the access latencies are, the better, regardless of the SD card class or "x" rating.
This very interesting article shows numbers for many different SD cards brands and classes. It also highlights the fact the highest class SD cards may not have the best latencies...
Regarding the Pi, it seems that a class 6 SD card is sufficient most of the times, according to the Pi capabilities. You may not need a higher class unless you're manipulating large files directly on the SD card instead of on an external HD for instance.
As a concrete example, this 8 GB class 6 SD card is fairly cheap and delivers good performances for most of the usages I've got for my Pi, e.g. media-center and games emulation.
-That's all folks!
If you've read and understood the previous section then you may think this could be wrong: the class (and in a certain way the "x" rating as well) gives an I/O rate, i.e. how fast the card is to read or write data.
However, before getting into this I/O you need to access the card and this takes a certain amount of time, and this time is not represented by the class neither the x speed.
This might not be big deal when it comes to read or write big chunks of data: the access latency would be negligible compared to the time it takes to write the data. However this latency would add up for each access the cards makes, so when it comes to access very small files, it may take ages even if the SD card is class 10.
Let's take a simple example with a class 10 SD card which would have a 1 second write access latency.
Class 10 means it can write 10 MB/s, i.e. it can write 10 GB (=10240 MB) of data in 10240/10=1024 s.
1 s latency means it will take the card 1 s each times it will begin to write a single file.
Write access latency adds up as follow:
- In the case of a single file (let's say a HD video), it is just a one off write access, so only 1 s latency added up to the write operation.
It makes it 1024+1 seconds to write this 10 GB file, which is roughly half an hour. - In the case of 10,240 files, each one 1 MB big , we still have 10 GB worth of data in total, but fragmented into 10,240 single files.
Hence we would still have the same writing time, 1024 sec, but the added latency remains 1 s per file, i.e. 10,240 seconds.
Total time for the 10GB write operations is now 1024+10240=11264 s, which is roughly more that 3 hours.
Conclusion: when it comes to manipulate small files, like Linux does, or like your MP3 collection is, the shorter the access latencies are, the better, regardless of the SD card class or "x" rating.
This very interesting article shows numbers for many different SD cards brands and classes. It also highlights the fact the highest class SD cards may not have the best latencies...
Regarding the Pi, it seems that a class 6 SD card is sufficient most of the times, according to the Pi capabilities. You may not need a higher class unless you're manipulating large files directly on the SD card instead of on an external HD for instance.
As a concrete example, this 8 GB class 6 SD card is fairly cheap and delivers good performances for most of the usages I've got for my Pi, e.g. media-center and games emulation.
-That's all folks!

No comments:
Post a Comment
Any question or feedback? Please feel free to add a comment!