Tuesday, February 19, 2013

New SD card benchmarks

Well, before I go to a bunch more work only to find out that I can't succeed, I decided to try to do a sustained write to the SD card that would last about 10 seconds.  Therefore, I choose to write 300,000 512-byte blocks (about 146.5 MiB).


With a 12-bit 15 MHz Analog->Digital Converter, we will need to read in 180 million bits per second, or 21.46 MiB/second.  With two cards splitting the load, each of them would need to be able to write at 10.73 MiB/second.


From start to finish, it took 13.467 seconds, or 10.88 MiB/s which is too close to the minimum to be reliable.  Future runs were slower.  For example one was as bad as 14.59 seconds (10.04 MiB/s).  Another test yielded 14.06 seconds (10.42 MiB/s).

Without using the SD card's pre-erase feature (which I can only use for the first 4 gigs on the SD card for some strange reason), I am getting 15.06 seconds (9.72 MiB/s).

EDIT : with an optimization and no pre-erase I am now getting 14.2 seconds (10.3 MiB/s).

EDIT #2 : I just tried doubling the data written.  Now I am getting 9.83 MiB/s.

NOTE : It looks like the reason for these speeds is because I am using this kind of SD card.  I've found that bigger (physically) and smaller (capacity) cards can write faster.

Conclusion: Ok, so two SD cards are almost fast enough but not quite.  Incredible.  I was so close!  I'm so close now that I will probably just buy another SD card.  But dang.. 3 SD cards!  This project is broadening into gargantuan proportions.

1 comment:

  1. Hi there,

    I was following all the post related to interfacing the SD Card because I am working on a familiar project.

    I wondered whether you could share your vhdl code to speed up my design, Id would be really helpful.

    Thank you in advance,
    Aitor

    ReplyDelete