Differences

This shows you the differences between two versions of the page.

Link to this comparison view

doc:sd-benchmark [2015/10/25 14:22]
vak
doc:sd-benchmark [2019/08/28 13:09] (current)
Line 1: Line 1:
 +===== 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:
 +<code>
 +# 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
 +</code>
 +
 +==== 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 Mb||31025-512BS A    || 959 kbytes/sec ||1191 kbytes/sec|| 5.6 sec ||
 +||NCP SD                  ||  256 Mb||AF256SD          || 927 kbytes/sec ||1187 kbytes/sec|| 6.9 sec ||
 +||Kodak SD Digital Film   ||  256 Mb||S442JT256U0BD    || 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 Gb||MBSPAGVDDBCW-B   || 730 kbytes/sec ||1140 kbytes/sec||**4.9** sec ||
 +||Kodak SD                ||  256 Mb||AP-ESD256CD21    || 434 kbytes/sec ||1010 kbytes/sec|| 6.0 sec ||
 +||Kodak SD                ||    2 Gb||31362-OC4-2GBOM A|| 418 kbytes/sec ||1040 kbytes/sec|| 5.2 sec ||
 +||Wintec SDHC Class 10    ||    8 Gb||LSON408GY5005MWI || 406 kbytes/sec || 948 kbytes/sec|| 5.3 sec ||
 +||**Lexar SDHC Platinum II 300x**||16 Gb||00044-V10-16GBHL A||393 kbytes/sec ||1101 kbytes/sec||**3.6** sec ||
 +||Kodak SD                ||    2 Gb||MMAGF02GWDCA-DB  || 382 kbytes/sec ||1170 kbytes/sec|| 5.3 sec ||
 +||Transcend SDHC Class 6  ||    4 Gb||8281BB 4G 01DS1  || 357 kbytes/sec || 952 kbytes/sec|| 5.4 sec ||
 +||SanDisk SDHC Class 4    ||    4 Gb||BH1023316173G    || 322 kbytes/sec || 377 kbytes/sec|| 5.9 sec ||
 +||Transcend SD            ||    2 Gb||BE1205521872G    || 312 kbytes/sec || 841 kbytes/sec|| 7.4 sec ||
 +||Lexar SDHC Class 10 400x||    8 Gb||31364-C10-8GBBM A|| 303 kbytes/sec ||1114 kbytes/sec|| 5.1 sec ||
 +||Lexar SD Premium 60x    ||    1 Gb||31108-1GBBS B    || 283 kbytes/sec ||1229 kbytes/sec|| 6.0 sec ||
 +||Patriot SD              ||    2 Gb||PSF2G4OSD-PC     || 259 kbytes/sec || 574 kbytes/sec||13.4 sec ||
 +||Delkin Devices SDHC Class 10||  4 Gb||S204ALWB4      || 234 kbytes/sec || 911 kbytes/sec|| 5.3 sec ||
 +||SanDisk SD Class 2      ||    2 Gb||MMAGF02GWECA-MB  || 172 kbytes/sec || 396 kbytes/sec||13.1 sec ||
 +
 +Shell test timing has been obtained using the following command:
 +<code>
 +time sh -c 'for i in /sbin/*; do date; done'
 +</code>
 +
 +==== 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 Mb||3402-512MA 4308K || 868 kbytes/sec||1195 kbytes/sec|| 5.8 sec ||
 +||**Samsung microSDHC EVO Select**||32 Gb||MBMEBGVEGAAW-T || 685 kbytes/sec|| 930 kbytes/sec||**3.6** sec ||
 +||Noname microSD             ||  512 Mb||HY71UG512M-MP    || 672 kbytes/sec||1164 kbytes/sec|| 9.5 sec ||
 +||Nokia microSD              ||  512 Mb||SDSDQ-512        || 588 kbytes/sec|| 938 kbytes/sec|| 5.9 sec ||
 +||**Delkin Devices microSD** ||  256 Mb||BSA256SCH80MS    || 705 kbytes/sec||1003 kbytes/sec||**4.9** sec ||
 +||Toshiba microSDHC Class 4  ||    4 Gb||1501W54488T      || 531 kbytes/sec||1233 kbytes/sec||14.1 sec ||
 +||Samsung microSDHC EVO      ||    8 Gb||MBMP8GVCDDCW-C   || 497 kbytes/sec||1023 kbytes/sec|| 5.4 sec ||
 +||**Samsung microSDHC Class 6**||  8 Gb||MBMS8GVCGBAW-C   || 479 kbytes/sec||1031 kbytes/sec|| 5.3 sec ||
 +||**Kodak microSDHC Class 4**||    4 Gb||31281-4GBOM B    || 467 kbytes/sec||1034 kbytes/sec||**5.1** sec ||
 +||Kodak microSDHC Class 4    ||    4 Gb||31350-4GBBM A    || 462 kbytes/sec||1020 kbytes/sec|| 5.2 sec ||
 +||Kodak microSDHC Class 4    ||    8 Gb||31350-0C4-8GBOM A|| 396 kbytes/sec|| 984 kbytes/sec|| 5.2 sec ||
 +||Kodak microSD              ||    2 Gb||MMAGR02GUDCA-DB  || 389 kbytes/sec||1171 kbytes/sec|| 5.3 sec ||
 +||Lexar microSD              ||    2 Gb||MM8GR02GUACY-NA  || 383 kbytes/sec||1166 kbytes/sec|| 5.4 sec ||
 +||Toshiba microSD            ||  512 Mb||0744L80865U      || 364 kbytes/sec||1242 kbytes/sec||12.7 sec ||
 +||Noname microSD SLC?        ||    1 Gb||E301G1344        || 338 kbytes/sec|| 978 kbytes/sec|| 5.4 sec ||
 +||Lexar microSDHC Class 10   ||    8 Gb||31464-C10-8GBBM A|| 338 kbytes/sec|| 892 kbytes/sec|| 5.3 sec ||
 +||Lexar microSDXC Class 10   ||   64 Gb||31354-C10-64GBM B|| 323 kbytes/sec|| 835 kbytes/sec|| 5.6 sec ||
 +||Lexar microSDHC Class 10   ||   16 Gb||31354-C10-16GOM B|| 320 kbytes/sec|| 863 kbytes/sec|| 5.5 sec ||
 +||Lexar microSDHC Class 10   ||   32 Gb||31354-C10-32GBM C|| 320 kbytes/sec|| 858 kbytes/sec|| 5.6 sec ||
 +||Delkin Devices microSDHC Class 10||  4 Gb||S204AJXKQ    || 297 kbytes/sec|| 886 kbytes/sec|| 5.1 sec ||
 +||Transcend microSD          ||    2 Gb||9191AA 2G 09SM1  || 292 kbytes/sec||1013 kbytes/sec|| 5.9 sec ||
 +||Kingston microSDHC Class 4 ||    8 Gb||1339R07212P      || 224 kbytes/sec|| 666 kbytes/sec|| 6.0 sec ||
 +||Samsung microSD            ||    2 Gb||MBMS2GMAGFAA-U2  || 208 kbytes/sec|| 772 kbytes/sec|| 6.3 sec ||
 +||Kingston microSDHC Class 10||    8 Gb||N0488-002.A01LF  || 203 kbytes/sec|| 807 kbytes/sec|| 5.9 sec ||
 +||ADATA microSD              ||    2 Gb||MMAUR02GUBCL-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 Mb||3402-512MA 4308K ||1478 kbytes/sec||1697 kbytes/sec||21.73 sec ||
 +||**Delkin Devices microSD** ||  256 Mb||BSA256SCH80MS    ||1347 kbytes/sec||1691 kbytes/sec||19.98 sec ||
 +||**Samsung microSDHC EVO**  ||   16 Gb||MBMPAGVDDDCW-P   ||1300 kbytes/sec||1639 kbytes/sec||**16.07** sec ||
 +||Noname microSD             ||  512 Mb||HY71UG512M-MP    ||1224 kbytes/sec||1673 kbytes/sec||59.17 sec ||
 +||Nokia microSD              ||  512 Mb||SDSDQ-512        ||1209 kbytes/sec||1661 kbytes/sec||24.46 sec ||
 +||**Samsung microSDHC EVO**  ||    8 Gb||MBMP8GVCDDCW-C   ||1192 kbytes/sec||1585 kbytes/sec||**16.25** sec ||
 +||**Samsung microSDHC Class 6**||  8 Gb||MBMS8GVCGBAW-C   ||1055 kbytes/sec||1611 kbytes/sec||16.51 sec ||
 +||Toshiba microSD            ||  512 Mb||0744L80865U      ||1016 kbytes/sec||1735 kbytes/sec||51.04 sec ||
 +||Lexar microSD              ||    2 Gb||MM8GR02GUACY-NA  || 916 kbytes/sec||1717 kbytes/sec||17.31 sec ||
 +||Kodak microSD              ||    2 Gb||MMAGR02GUDCA-DB  || 901 kbytes/sec||1700 kbytes/sec||17.74 sec ||
 +||ADATA microSD              ||    2 Gb||MMAUR02GUBCL-NJ  || 867 kbytes/sec||1659 kbytes/sec||16.03 sec ||
 +||**Lexar microSDHC Class 10**||  32 Gb||31354-C10-32GBM C|| 824 kbytes/sec||1591 kbytes/sec||**16.15** sec ||
 +||Lexar microSDHC Class 10   ||    8 Gb||31464-C10-8GBBM A|| 816 kbytes/sec||1597 kbytes/sec||18.47 sec ||
 +||**Kodak microSDHC Class 4**||    8 Gb||31350-0C4-8GBOM A|| 776 kbytes/sec||1669 kbytes/sec||16.64 sec ||
 +||Noname microSD SLC?        ||    1 Gb||E301G1344        || 768 kbytes/sec||1716 kbytes/sec||21.43 sec ||
 +||Delkin Devices microSDHC Class 10||  4 Gb||S204AJXKQ    || 759 kbytes/sec||1587 kbytes/sec||25.97 sec ||
 +||Lexar microSDHC Class 10   ||   16 Gb||31354-C10-16GOM B|| 758 kbytes/sec||1593 kbytes/sec||17.71 sec ||
 +||Lexar microSDXC Class 10   ||   64 Gb||31354-C10-64GBM B|| 748 kbytes/sec||1594 kbytes/sec||17.89 sec ||
 +||Kodak microSDHC Class 4    ||    4 Gb||31281-4GBOM B    || 741 kbytes/sec||1657 kbytes/sec||17.37 sec ||
 +||Kodak microSDHC Class 4    ||    4 Gb||31350-4GBBM A    || 736 kbytes/sec||1667 kbytes/sec||17.23 sec ||
 +||Kingston microSDHC Class 10||    8 Gb||N0488-002.A01LF  || 551 kbytes/sec||1589 kbytes/sec||20.43 sec ||
 +||Sony microSDHC Class 4 SR-4C4||  4 Gb||E304G1135        || 537 kbytes/sec||1526 kbytes/sec|| panic(2) ||
 +||Kingston microSDHC Class 4 ||    8 Gb||1339R07212P      || 487 kbytes/sec||1506 kbytes/sec|| panic(2) ||
 +||ADATA microSDHC Class 4    ||    8 Gb||sip14076k011a    ||  ---          || I/O errors(3) ||  ---     ||
 +
 +
 +File list timing has been obtained using the following command:
 +<code>
 +time ls -lR /
 +</code>
 +
 +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.