SPI SD Card Speed Reading..

So, how fast can I read the device ? is it fully dependant on the quality of the card ?

Card class is not very important on Arduino. High end cards are designed to perform well with very large contiguous transfers using the 4-bit SDIO bus. You may see about 10% difference for read speed of 512 byte blocks on an AVR board. The speed difference may not correlate with card class.

Read performance drops with transfer size. Here are tests using SdFat with 8 MHz SPI. SD.h uses an old version of SdFat with 4 MHz SPI so it will be slower for large transfers.

I used a high-end 32 GB SanDisk card.

512 byte block read: 499.5 KB/sec

64 byte block read: 316.3 KB/sec

8 byte block read: 125.4 KB/sec

2 byte block read: 40.4 KB/sec

1 byte reads: 24.0 KB/sec

peek followed by 1 byte read: 12.1 KB/sec

SD is not a good substitute for external SPI RAM for small reads.

Some users read from an SD and store data in non-volatile SPI SRAM of FRAM.

I wrote drivers and a file system for FRAM and battery backed SRAM RamDisk

I attached a chart for FRAM and SRAM performance as a function of transfer size.

FRAM_perf.pdf (167 KB)

SerialRamPerformance.pdf (168 KB)