View Single Post
Posts: 167 | Thanked: 204 times | Joined on Jul 2010
#5
Originally Posted by Estel View Post
I totally agree with idea of establishing simple, yet standardized criteria for benchmarking (micro)SD cards - just like for batteries in battery thread. Especially, that manufacturer's data are mostly useless, and raw batch speed are irrelevant in case of running OS'es from card/using it as swap. BTW, such benchmarks could be useful not only for us - basically, same criteria apply to all things, where random access speed is much more important that batch, raw measurements.
Well, from a quick look at what's available, I'm fairly happy to use bonnie++ as the benchmarking tool; as well as measuring raw throughput for both per-char and block reads and writes, it measures random seeks within a large file (swap-like usage). It can also (optionally) run a bunch of tests for file create/stat/unlink using multiples of 1024 files of user-definable size. More info on that in the bonnie++ readme, but in short, we can use it to perform a set of benchmarks that should be useful whether your interest in a given card is for movies, operating system, swap or whatever. What I'm not sure is the precise parameters with which to test in order for the results to be widely useful.

So, I'm going to start by throwing up benchmarks of a couple of microSD cards that I've owned for years, taken on my N900 (kp50, 250-900MHz) using the command:

# time bonnie -r 256 -s 512 -n 8:65536:4096 -u root -d /media/mmc1/

and please, pick holes in my results (posted using ZeroBin as I can't readily format space-separated plain text on the forum)

Toshiba 16GB Class 2, 11/2009: http://sebsauvage.net/paste/?58bbcb2...SmlXA7LscVaEo=
Sandisk 16GB Class 2, 12/2008: http://sebsauvage.net/paste/?cd8a7fc...uPTGxUlKtpJAc=

Disclaimer: these first two tests are actually performed on 2 different N900s (though both are running exactly the same software and kernel). I might swap the cards over and see how reproducible the results are.

The results are not surprising; previous testing of the Sandisk card had suggested that it performed as a class 4 but not quite as a class 6, so a block write speed of 4720Kb/sec is believable. It was only marketed as a class 2 and it's been in active use for over 3 years, so I can't complain. The Toshiba card was known to be slower (it usually lives in a Nintendo DS) and the block write speed, one third that of the Sandisk, reflects how the card performs in real life. Fine for loading up once with stuff that doesn't change often, no good for dumping videos on though.

What I do find interesting is that the Toshiba card takes twice the wall clock time to complete the same test, being much slower on file creation whether sequential or random. It's such a difference that I also stopped to make sure my FAT filesystems are both using the same block sizes - which they are. This would seem to make it pretty useless for operating system use, again, not a surprise and not contradicting what I expected.

Feedback invited, also if anyone wants to run similar tests on their own SD cards by way of a sanity check...
 

The Following 3 Users Say Thank You to magick777 For This Useful Post: