Recently I purchased a Class 10 SD Card from a major retailer. I was very excited – now I have a fast card for testing. Here’s my new baby:
Note the 10 in the part-circle indicating the speed. For those who don’t know, the “class” speed system for SD cards is very simple. It’s the write speed, in MB/s (megabytes per second). So a class 4 card can be written to at 4 MB/s, a class 6 at 6 MB/s etc. So yes, a class 10 could be written to at 10 MB/s.
And it worked really well for small files, but when writing large files it would sometimes slow down. Some investigation produced the following oscilloscope screen capture:
What you’re seeing is the card crying out, “I’m Busy!” for extended periods of time. The top (purple) trace is a trigger pulse. The middle (yellow) trace is the CMD line, and the bottom (green) trace is the DATA0 line. SD cards hold their DATA0 line low when they’re busy; this is how they tell you to wait. I was seeing this Duracell SD card pull busy for up to 250 ms at a time. It seems to me it’d be real tough to sustain 10 MB/s writes to the card, if the card is busy a quarter of a second at a time, every few seconds.
So I wrote to Duracell tech support (yes, they really do have one), and they replied, ‘Thanks very much – we’ll look into it.”
Most interestingly, I’m pretty sure I read somewhere that the SD Card spec actually allows for these long “busy” periods to happen. So a card can actually do this, yet remain compliant with the spec. That can make life hard for a user of the card however.
I have a pretty good collection of SD cards, so I started looking at a bunch of them, comparing their labels to what the internal card register says. Almost all cards had the label agree with the register. But I did find an interesting “happy” exception. A Lexar “class 4″ card actually read as a class 6. And for large file sizes, this Lexar “class 4″ card actually outperforms the “class 10″ Duracell. Like the Duracell. the Lexar also asserts busy from time to time. But the Lexar busy durations are far shorter than the Duracell – a maximum of around 80 ms, compared to a quarter of a second for the Duracell. Making the Lexar much easier to deal with from a file-writing perspective.
How about that hey? A Lexar “class 4″ card outperforming a Duracell “class 10″ SD card. When it comes to SD cards, things aren’t always as they seem. And sometimes it really is worth paying the extra money for the top-brand cards.
Update 27 Sept 2011: I’ve done a bunch more testing on my various cards and I’ve managed to write to this particular Duracell card at 9 MB/s. Pretty darn close to a “class 10″ card if you ask me (and I might yet be able to write faster still). How? By writing a 32 MB block of data consecutively to the card without any filesystem – just a raw data write as fast as possible. This highlights an important consideration with SD cards – the write speed really is affected by the amount of data you write. With a filesystem on the card, writing one 32 kB cluster at a time, the “write plus programming time” gets pretty slow. To hit the big write-speed numbers you really need to find a way to write much larger blocks of data at a time.