SD card benchmark

SD and microSD cards are often used for embedded systems, due to their simple hardware interface. If you have an SPI port on your microcontroller, you can attach an SD card to it.

Most modern SD cards are not optimized for SPI interface. It's hard to rell which card is better, until you test it on a real system. Here I collect results of my measurements for various SD and microSD cards, obtained using diskspeed utility on RetroBSD and LiteBSD systems.

When invoked without parameters, diskspeed utility performs write and read tests of 8-Mbyte file using 4-kbyte blocks:

# diskspeed
Testing 4-kbyte block size.
Write speed: 8 Mbytes in 21.505 seconds = 380 kbytes/sec
 Read speed: 8 Mbytes in 8.765 seconds = 934 kbytes/sec

SD cards: RetroBSD

Board: Maximite Color
SPI clock: 13.3 MHz
Block size: 4 kbytes

Card Size Id Write speed Read speed Shell test
Lexar SD Platinum II 512 Mb31025-512BS A 959 kbytes/sec 1191 kbytes/sec 5.6 sec
NCP SD 256 MbAF256SD 927 kbytes/sec 1187 kbytes/sec 6.9 sec
Kodak SD Digital Film 256 MbS442JT256U0BD 854 kbytes/sec 1258 kbytes/sec 9.6 sec
Kodak SD High Perf. 512 Mb (none) 746 kbytes/sec 1191 kbytes/sec 7.9 sec
Samsung SDHC EVO 16 GbMBSPAGVDDBCW-B 730 kbytes/sec 1140 kbytes/sec4.9 sec
Kodak SD 256 MbAP-ESD256CD21 434 kbytes/sec 1010 kbytes/sec 6.0 sec
Kodak SD 2 Gb31362-OC4-2GBOM A 418 kbytes/sec 1040 kbytes/sec 5.2 sec
Wintec SDHC Class 10 8 GbLSON408GY5005MWI 406 kbytes/sec 948 kbytes/sec 5.3 sec
Kodak SD 2 GbMMAGF02GWDCA-DB 382 kbytes/sec 1170 kbytes/sec 5.3 sec
Transcend SDHC Class 6 4 Gb8281BB 4G 01DS1 357 kbytes/sec 952 kbytes/sec 5.4 sec
SanDisk SDHC Class 4 4 GbBH1023316173G 322 kbytes/sec 377 kbytes/sec 5.9 sec
Transcend SD 2 GbBE1205521872G 312 kbytes/sec 841 kbytes/sec 7.4 sec
Lexar SDHC Class 10 400x 8 Gb31364-C10-8GBBM A 303 kbytes/sec 1114 kbytes/sec 5.1 sec
Lexar SD Premium 60x 1 Gb31108-1GBBS B 283 kbytes/sec 1229 kbytes/sec 6.0 sec
Patriot SD 2 GbPSF2G4OSD-PC 259 kbytes/sec 574 kbytes/sec13.4 sec
Delkin Devices SDHC Class 10 4 GbS204ALWB4 234 kbytes/sec 911 kbytes/sec 5.3 sec
SanDisk SD Class 2 2 GbMMAGF02GWECA-MB 172 kbytes/sec 396 kbytes/sec13.1 sec

Shell test timing has been obtained using the following command:

time sh -c 'for i in /sbin/*; do date; done'

microSD cards: RetroBSD

Board: Fubarino SDXL
SPI clock: 13.3 MHz
Block size: 4 kbytes

Card Size Id Write speed Read speed Shell test
Lexar microSD 512 Mb3402-512MA 4308K 868 kbytes/sec1195 kbytes/sec 5.8 sec
Noname microSD 512 MbHY71UG512M-MP 672 kbytes/sec1164 kbytes/sec 9.5 sec
Nokia microSD 512 MbSDSDQ-512 588 kbytes/sec 938 kbytes/sec 5.9 sec
Delkin Devices microSD 256 MbBSA256SCH80MS 705 kbytes/sec1003 kbytes/sec4.9 sec
Toshiba microSDHC Class 4 4 Gb1501W54488T 531 kbytes/sec1233 kbytes/sec14.1 sec
Samsung microSDHC EVO 8 GbMBMP8GVCDDCW-C 497 kbytes/sec1023 kbytes/sec 5.4 sec
Samsung microSDHC Class 6 8 GbMBMS8GVCGBAW-C 479 kbytes/sec1031 kbytes/sec 5.3 sec
Kodak microSDHC Class 4 4 Gb31281-4GBOM B 467 kbytes/sec1034 kbytes/sec5.1 sec
Kodak microSDHC Class 4 4 Gb31350-4GBBM A 462 kbytes/sec1020 kbytes/sec 5.2 sec
Kodak microSDHC Class 4 8 Gb31350-0C4-8GBOM A 396 kbytes/sec 984 kbytes/sec 5.2 sec
Kodak microSD 2 GbMMAGR02GUDCA-DB 389 kbytes/sec1171 kbytes/sec 5.3 sec
Lexar microSD 2 GbMM8GR02GUACY-NA 383 kbytes/sec1166 kbytes/sec 5.4 sec
Toshiba microSD 512 Mb0744L80865U 364 kbytes/sec1242 kbytes/sec12.7 sec
Noname microSD SLC? 1 GbE301G1344 338 kbytes/sec 978 kbytes/sec 5.4 sec
Lexar microSDHC Class 10 8 Gb31464-C10-8GBBM A 338 kbytes/sec 892 kbytes/sec 5.3 sec
Lexar microSDXC Class 10 64 Gb31354-C10-64GBM B 323 kbytes/sec 835 kbytes/sec 5.6 sec
Lexar microSDHC Class 10 16 Gb31354-C10-16GOM B 320 kbytes/sec 863 kbytes/sec 5.5 sec
Lexar microSDHC Class 10 32 Gb31354-C10-32GBM C 320 kbytes/sec 858 kbytes/sec 5.6 sec
Delkin Devices microSDHC Class 10 4 GbS204AJXKQ 297 kbytes/sec 886 kbytes/sec 5.1 sec
Transcend microSD 2 Gb9191AA 2G 09SM1 292 kbytes/sec1013 kbytes/sec 5.9 sec
Kingston microSDHC Class 4 8 Gb1339R07212P 224 kbytes/sec 666 kbytes/sec 6.0 sec
Samsung microSD 2 GbMBMS2GMAGFAA-U2 208 kbytes/sec 772 kbytes/sec 6.3 sec
Kingston microSDHC Class 10 8 GbN0488-002.A01LF 203 kbytes/sec 807 kbytes/sec 5.9 sec
ADATA microSD 2 GbMMAUR02GUBCL-NJ I/O errors(1)

microSD cards: LiteBSD

Board: chipKIT Wi-Fire
SPI clock: 16.7 MHz
Block size: 4 kbytes

Card Size Id Write speed Read speed File list
Lexar microSD 512 Mb3402-512MA 4308K 1478 kbytes/sec1697 kbytes/sec21.73 sec
Delkin Devices microSD 256 MbBSA256SCH80MS 1347 kbytes/sec1691 kbytes/sec19.98 sec
Samsung microSDHC EVO 16 GbMBMPAGVDDDCW-P 1300 kbytes/sec1639 kbytes/sec16.07 sec
Noname microSD 512 MbHY71UG512M-MP 1224 kbytes/sec1673 kbytes/sec59.17 sec
Nokia microSD 512 MbSDSDQ-512 1209 kbytes/sec1661 kbytes/sec24.46 sec
Samsung microSDHC EVO 8 GbMBMP8GVCDDCW-C 1192 kbytes/sec1585 kbytes/sec16.25 sec
Samsung microSDHC Class 6 8 GbMBMS8GVCGBAW-C 1055 kbytes/sec1611 kbytes/sec16.51 sec
Toshiba microSD 512 Mb0744L80865U 1016 kbytes/sec1735 kbytes/sec51.04 sec
Lexar microSD 2 GbMM8GR02GUACY-NA 916 kbytes/sec1717 kbytes/sec17.31 sec
Kodak microSD 2 GbMMAGR02GUDCA-DB 901 kbytes/sec1700 kbytes/sec17.74 sec
ADATA microSD 2 GbMMAUR02GUBCL-NJ 867 kbytes/sec1659 kbytes/sec16.03 sec
Lexar microSDHC Class 10 32 Gb31354-C10-32GBM C 824 kbytes/sec1591 kbytes/sec16.15 sec
Lexar microSDHC Class 10 8 Gb31464-C10-8GBBM A 816 kbytes/sec1597 kbytes/sec18.47 sec
Kodak microSDHC Class 4 8 Gb31350-0C4-8GBOM A 776 kbytes/sec1669 kbytes/sec16.64 sec
Noname microSD SLC? 1 GbE301G1344 768 kbytes/sec1716 kbytes/sec21.43 sec
Delkin Devices microSDHC Class 10 4 GbS204AJXKQ 759 kbytes/sec1587 kbytes/sec25.97 sec
Lexar microSDHC Class 10 16 Gb31354-C10-16GOM B 758 kbytes/sec1593 kbytes/sec17.71 sec
Lexar microSDXC Class 10 64 Gb31354-C10-64GBM B 748 kbytes/sec1594 kbytes/sec17.89 sec
Kodak microSDHC Class 4 4 Gb31281-4GBOM B 741 kbytes/sec1657 kbytes/sec17.37 sec
Kodak microSDHC Class 4 4 Gb31350-4GBBM A 736 kbytes/sec1667 kbytes/sec17.23 sec
Kingston microSDHC Class 10 8 GbN0488-002.A01LF 551 kbytes/sec1589 kbytes/sec20.43 sec
Sony microSDHC Class 4 SR-4C4 4 GbE304G1135 537 kbytes/sec1526 kbytes/sec panic(2)
Kingston microSDHC Class 4 8 Gb1339R07212P 487 kbytes/sec1506 kbytes/sec panic(2)
ADATA microSDHC Class 4 8 Gbsip14076k011a I/O errors(3)

File list timing has been obtained using the following command:

time ls -lR /

Notes:

  • (1) ADATA microSD 2Gb card on RetroBSD: unable to mount filesystem: incorrect data read from disk. The same card works fine (and pretty fast) on LitebSD.
  • (2) Sony microSDHC 4Gb card and Kingston microSDHC 8Gb card on LiteBSD: kernel panic with “microtime watchdog” message. The driver pauses for too long with interrupts disabled.
  • (3) ADATA microSDHC 8Gb card on LiteBSD: timeout errors in driver.