SDCard Testing: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page discusses additional tests for SD Cards. The 'base' tests are described in [[NAND_Testing]].
This page discusses additional tests for SD Cards. The 'base' tests are described in [[NAND_Testing]].


= Test procedure =
= Flashbench random I/O test procedure =


== Preparations ==
== Preparations ==


# On an XO with the latest stable OS release installed
# On an XO with the latest stable OS release installed
# Download and compile flashbench from git://git.linaro.org/people/arnd/flashbench.git
# Download and compile flashbench from git://git.linaro.org/people/arnd/flashbench.git (or fetch a precompiled x86 version from http://dev.laptop.org/~martin/flashbench/flashbench )
# 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
# Download the flashbench wrapper script from http://dev.laptop.org/~martin/flashbench/run_test.sh , place it in the same directory as the flashbench executable


== Procedure ==
== Procedure ==
Line 15: Line 15:
# Open a Sugar Terminal or GNOME Terminal
# Open a Sugar Terminal or GNOME Terminal
# run <code>flashbench_sdtest.sh /dev/mmcblk1</code>
# run <code>flashbench_sdtest.sh /dev/mmcblk1</code>
# Copy output
# Copy output

Note: unfortunately as of May 2011 flashbench has a bug that prevents writing output to a file.


= Cards tested =
= Cards tested =


"A" SanDisk C2 4GB uSD==
"A" SanDisk C2 4GB uSD
NAME=SU04G
OEMID=0x5344
MANFID=0x000003
HWREV=0x8
FWREV=0x0
"A1" SanDisk C2 4GB uSD (mislabelled batch?)
NAME=SU04G
NAME=SU04G
OEMID=0x5344
OEMID=0x5344
Line 25: Line 33:
HWREV=0x8
HWREV=0x8
FWREV=0x0
FWREV=0x0
"B" Toshiba C2 4GB uSD
"B" Toshiba (?) C4 4GB uSD
NAME=SD
NAME=SD
OEMID=0x4144
OEMID=0x4144
Line 31: Line 39:
HWREV=0x1
HWREV=0x1
FWREV=0x0
FWREV=0x0
"C" SanDisk C2 8GB uSD==
NAME=SA08G
OEMID=0x5344
MANFID=0x000002
HWREV=0x0
FWREV=0x6


=Results=
=Results=
Line 37: Line 51:


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

{| class="wikitable"
{| class="wikitable"
|-
|-
! Size
! Size
! Sample High perf card
! Sample High perf card
! SanDisk C2 4GB uSD "A"
! A (C2-4GB)
! Toshiba C2 4GB uSD "B"
! A1 (C2-4GB)
! B (C4-4GB)
! C (C2-8GB)
! Unusable card
! Unusable card
|-
|-
Line 49: Line 65:
| 8.86M/s
| 8.86M/s
| 3.14M/s
| 3.14M/s
| 3.51M/s
| 5.84M/s
| 5.84M/s
| 4.19M/s
| 15M/s
| 15M/s
|-
|-
Line 55: Line 73:
| 6.3M/s
| 6.3M/s
| 4.09M/s
| 4.09M/s
| 2.9M/s
| 3.6M/s
| 3.6M/s
| 2.59M/s
| 9.47M/s
| 9.47M/s
|-
|-
| 1MiB
| 1MiB
| 5.02M/s
| 5.02M/s
| 2.84M/s
| 2.84M/s
| 2.84M/s
| 2.21M/s
| 2.21M/s
| 1.35M/s
| 4.47M/s
| 4.47M/s
|-
|-
Line 67: Line 89:
| 5.16M/s
| 5.16M/s
| 1.33M/s
| 1.33M/s
| 2.45M/s
| 1.3M/s
| 1.3M/s
| 649K/s
| 1.61M/s
| 1.61M/s
|-
|-
Line 73: Line 97:
| 4.69M/s
| 4.69M/s
| 868K/s
| 868K/s
| 2.3M/s
| 701K/s
| 701K/s
| 353K/s
| 849K/s
| 849K/s
|-
|-
Line 79: Line 105:
| 3.78M/s
| 3.78M/s
| 556K/s
| 556K/s
| 2.02M/s
| 363K/s
| 363K/s
| 180K/s
| 441K/s
| 441K/s
|-
|-
Line 85: Line 113:
| 4.62M/s
| 4.62M/s
| 297K/s
| 297K/s
| 1.71M/s
| 186K/s
| 186K/s
| 90.6K/s
| 226K/s
| 226K/s
|-
|-
Line 91: Line 121:
| 2.71M/s
| 2.71M/s
| 155K/s
| 155K/s
| 1.29M/s
| 92K/s
| 92K/s
| 45.7K/s
| 115K/s
| 115K/s
|-
|-
Line 97: Line 129:
| 2.38M/s
| 2.38M/s
| 76K/s
| 76K/s
| 1.48M/s
| 47K/s
| 47K/s
| 23.1K/s
| 57K/s
| 57K/s
|-
|-
Line 103: Line 137:
| 1.24M/s
| 1.24M/s
| 38K/s
| 38K/s
| 923K/s
| 23K/s
| 23K/s
| 11.7K/s
| 23K/s
| 23K/s
|-
|-
| 4KiB
| '''4KiB'''
| 907K/s
| 907K/s
| 19K/s
| 19K/s
| 919K/s
| '''11.8K/s'''
| '''11.8K/s'''
| '''5.95K/s'''
| '''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.

Latest revision as of 21:43, 19 May 2011

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 (or fetch a precompiled x86 version from http://dev.laptop.org/~martin/flashbench/flashbench )
  3. Download the flashbench wrapper script from http://dev.laptop.org/~martin/flashbench/run_test.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

Note: unfortunately as of May 2011 flashbench has a bug that prevents writing output to a file.

Cards tested

"A" SanDisk C2 4GB uSD
 NAME=SU04G
 OEMID=0x5344
 MANFID=0x000003
 HWREV=0x8
 FWREV=0x0
"A1" SanDisk C2 4GB uSD (mislabelled batch?)
 NAME=SU04G
 OEMID=0x5344
 MANFID=0x000003
 HWREV=0x8
 FWREV=0x0
"B" Toshiba (?) C4 4GB uSD
 NAME=SD
 OEMID=0x4144
 MANFID=0x00001d
 HWREV=0x1
 FWREV=0x0
"C" SanDisk C2 8GB uSD==
 NAME=SA08G
 OEMID=0x5344
 MANFID=0x000002
 HWREV=0x0
 FWREV=0x6

Results

Segment size vs throughput.

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

Size Sample High perf card A (C2-4GB) A1 (C2-4GB) B (C4-4GB) C (C2-8GB) Unusable card
4MiB 8.86M/s 3.14M/s 3.51M/s 5.84M/s 4.19M/s 15M/s
2MiB 6.3M/s 4.09M/s 2.9M/s 3.6M/s 2.59M/s 9.47M/s
1MiB 5.02M/s 2.84M/s 2.84M/s 2.21M/s 1.35M/s 4.47M/s
512KiB 5.16M/s 1.33M/s 2.45M/s 1.3M/s 649K/s 1.61M/s
256KiB 4.69M/s 868K/s 2.3M/s 701K/s 353K/s 849K/s
128KiB 3.78M/s 556K/s 2.02M/s 363K/s 180K/s 441K/s
64KiB 4.62M/s 297K/s 1.71M/s 186K/s 90.6K/s 226K/s
32KiB 2.71M/s 155K/s 1.29M/s 92K/s 45.7K/s 115K/s
16KiB 2.38M/s 76K/s 1.48M/s 47K/s 23.1K/s 57K/s
8KiB 1.24M/s 38K/s 923K/s 23K/s 11.7K/s 23K/s
4KiB 907K/s 19K/s 919K/s 11.8K/s 5.95K/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.