SDCard Testing

From OLPC
Jump to navigation Jump to search

This page discusses additional tests for SD Cards. The 'base' tests are described in NAND_Testing.

Flashbench random I/O test procedure

Preparations

  1. On an XO with the latest stable OS release installed
  2. Download and compile flashbench from git://git.linaro.org/people/arnd/flashbench.git
  3. Download the flashbench wrapper script from http://dev.laptop.org/~martin/flashbench/flashbench_sdtest.sh , place it in the same directory as the flashbench executable

Procedure

  1. When booting the test bench machine, ensure no SD cards are present in the external slot
  2. Insert uSD card with adapter in the external slot
  3. Open a Sugar Terminal or GNOME Terminal
  4. run flashbench_sdtest.sh /dev/mmcblk1
  5. Copy output

Cards tested

"A" SanDisk C2 4GB uSD==
 NAME=SU04G
 OEMID=0x5344
 MANFID=0x000003
 HWREV=0x8
 FWREV=0x0
"B" Toshiba C2 4GB uSD
 NAME=SD
 OEMID=0x4144
 MANFID=0x00001d
 HWREV=0x1
 FWREV=0x0

Results

Segment size vs throughput.

The first and last examples are based on numbers provided by Arnd Bergmann

Size Sample High perf card SanDisk C2 4GB uSD "A" Toshiba C2 4GB uSD "B" Unusable card
4MiB 8.86M/s 3.14M/s 5.84M/s 15M/s
2MiB 6.3M/s 4.09M/s 3.6M/s 9.47M/s
1MiB 5.02M/s 2.84M/s 2.21M/s 4.47M/s
512KiB 5.16M/s 1.33M/s 1.3M/s 1.61M/s
256KiB 4.69M/s 868K/s 701K/s 849K/s
128KiB 3.78M/s 556K/s 363K/s 441K/s
64KiB 4.62M/s 297K/s 186K/s 226K/s
32KiB 2.71M/s 155K/s 92K/s 115K/s
16KiB 2.38M/s 76K/s 47K/s 57K/s
8KiB 1.24M/s 38K/s 23K/s 23K/s
4KiB 907K/s 19K/s 11.8K/s 8K/s

Technical discussion

Flashbench is useful to experimentally establish the operating parameters of the FTL embedded in an SD card. See https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey for the author's own SD card survey.

In our case, we want to evaluate the suitability of an SD card for usage as the root filesystem of our Linux-powered laptops. The key factor is write/read performance in 4KB blocks as used by ext3/4, btrfs and other modern linux filesystems.

So the 4KiB row results are the strongest indicators of whether a particular SD card will be responsive under Linux.