Some CompactFlash benchmarks

Version 0.2
Copyright © 2007,2008 by Zack Smith

Introduction

Recently I decided to test the speed of my various CompactFlash cards and USB 2.0 reader. Over the years I've collected many CompactFlash cards but I had never put them all to a systematic test. So finally, curiosity got the better of me and I devised a couple tests to run under Linux.

Equipment

I executed my tests on a Toshiba A135 Core Duo based system running Linux kernel 2.6.15.1. The CompactFlash cards were put in a PNY USB 2.0 adapter that was plugged into a USB 2.0 port. There is no model number on the adapter.

Write test

The write test consisted of copying 41.99 MB file to the USB2-mounted flash drive, then sync'ing a few times to ensure all data were written to the drive. I put these commands in a script and used the "time" command to time the execution of the script.

Read test

The read test was very simple. It consisted of running "hdparm -t" twice and taking a rough average.

Results

Only two of my CF cards actually state on them what the speed ("X") rating is supposed to be, so although I've recorded that info, I also calculate the actual speed.

Note that 1X speed is actually defined as 150 kB/second, which is 1X for a CDROM drive.

_ROW _ROW _ROW _ROW _ROW _ROW _ROW _ROW _ROW
Brand Capacity Speed Write times (seconds) Avg. write time Write rate Write X speed Read rate Read X speed
Lexar 48M 4X 41.418 41.473 41.460 average 41.45 1.013 MB/s write 6.753X write 3.6 MB/s read 24X
Sandisk 64M - 47.863 47.744 47.389 average 47.67 0.8808 MB/s write 5.872X write 1.9 MB/s read 13X
PNY 128M - 29.743 31.023 30.659 average 30.48 1.378 MB/s write 9.187X write 3.8 MB/s read 25X
Sandisk 128M - 23.239 23.358 23.239 average 23.28 1.804 MB/s write 12.03X write 3.8 MB/s read 25X
PNY 256M - 26.552 26.479 26.573 average 26.53 1.580 MB/s write 10.53X write 3.8 MB/s read 25X
Sandisk 256M - 17.326 18.056 17.828 17.671 average 17.72 2.370 MB/s write 15.80X write 3.7 MB/s read 24X
Crucial 256M - 9.755 9.591 9.624 average 9.657 4.348 MB/s write 23.97X write 3.8 MB/s read 25X
Lexar 512M 4X 15.116 9.641 10.881 12.626 average 12.07 3.479 MB/s write 23.19X write 4.2 MB/s read 28X
Sandisk UltraII 1024M - 8.786 8.476 8.463 average 8.575 4.897 MB/s write 32.65X write 4.9 MB/s read 33X

Discussion

I think the first thing to take note of is that while the PNY adapter gave good performance, it's not inconcievable that it has performance limitations. I can't say I'm certain this is the case until I get my hands on a known-fast CompactFlash card.

The second thing to note is that the 4X rating that appeared on the two Lexar cards is clearly meaningless. Both cards performed better. All of the cards performed better.

Also of note is that fact that I did not do as many read tests using hdparm as I did write tests. The reason is that hdparm did not strike me as the best way to test read speed, but the way I desired to do it was too tedious. Namely, my original plan had been to test the read speed by writing the 42 meg file to the CF card, unmounting it to make sure the data wasn't cached held in RAM, then remounting it and time the speed to cat it to /dev/null.

Conclusion

Without knowing what the read/write limitation of the PNY adapter is, my tests are useful in that they prove I didn't get ripped off just because I bought unrated CompactFlash cards: they all performed pretty well. The next step will be to ascertain the upper limit of the PNY adapter's performance.

Links