SD and USB FLASH Drive Performance: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 21: Line 21:
! Write Speed MB/sec
! Write Speed MB/sec
! fs-update min:sec os201.zd
! fs-update min:sec os201.zd
! Notes
|-
|-
| SD SanDisk ExtremeIII 2G
| SD SanDisk ExtremeIII 2G
Line 53: Line 54:
| 08:31
| 08:31
|-
|-
| MicroSD ADATA 4G ("Class 2") from MP
| MicroSD ADATA 4G
| 7.2
| 7.2
| 3.8
| 3.8
| 19:25
| 19:25
| From an MP XO -- tested on internal slot
|-
|-
| MicroSD Transcend 4G "class 2"
| MicroSD Transcend 4G "class 2"

Revision as of 14:31, 5 August 2010

This page records some performance tests I did on SD cards and USB storage devices.

Methodology

The test uses the OFW ".speed" command that first appeared in Q3A50 for XO-1.5 (slated for Q2E45 for XO-1).

.speed uses raw multiple-block reads and writes to access the target device in large chunks. It reads the first 32 MiB of the device into memory, calculates the read speed based on how long that took, then writes the data back out to the same place, calculating the write speed.

The chunk size is given by the "max-transfer" method of the target device. In some cases, max-transfer is smaller than the actual maximum transfer length that the device can support, because of filesystem performance tradeoffs. I did some preliminary testing of SD cards with chunk sizes larger than max-transfer and found that the measured performance increased only slightly.

The SD cards were tested in the external SD slot of an XO-1.5 revision "D4". The MicroSD cards were tested in the same slot using a (passive) MicroSD to SD mechanical adapter. I tested a SanDisk 4G MicroSD card in the internal slot and got the same result as for the same model card in the external slot.

Results

Where one number is given, the results of several runs clustered tightly around that number. Where a range is given, the results varied more widely. "Large" numbers are rounded to the nearest integer.

Device Read Speed MB/sec Write Speed MB/sec fs-update min:sec os201.zd Notes
SD SanDisk ExtremeIII 2G 20 18
SD SanDisk ExtremeIII 4G 20 17
SD SanDisk ExtremeIII 8G 20 12-17
SD Transcend 4G "150x" 21 17 06:28
MicroSD SanDisk 4G "class 2" 20 6-7 10:11
MicroSD ADATA 2G 11-15 6
MicroSD ADATA 4G 17 8 08:31
MicroSD ADATA 4G 7.2 3.8 19:25 From an MP XO -- tested on internal slot
MicroSD Transcend 4G "class 2" 20 7 10:00
MicroSD Kingston 2G 21 7
SD Panasonic 512M "PRO HIGH SPEED" (old) 18 12
SD SanDisk 32M (old) 1.6 0.9
MMC Kingston 256M (old) 3 3
USB Datatraveler 1G 6.4 2.4
USB SanDisk Cruzer 4G 6.4 0.8-1.4
USB Verbatim 1G 6.4 1.2
USB Belkin 1G 3.6 3.4
USB Seagate 4G Hard Disk Puck 5.1-6.2 6.2
USB Kingston MicroSD Adapter w/Kingston 2G MicroSD 6.4 4.5
USB SanDisk SD Adapter w/Transcend 4G SD 6.4 6.2
USB SanDisk SD Adapter w/Transcend 4G SD 6.4 6.2
USB SanDisk SD Adapter w/Transcend 4G SD 6.4 6.2
USB SanDisk SD Adapter w/ExtremeIII 2G SD 6.4 1.9
USB SanDisk SD Adapter w/ExtremeIII 4G SD 6.4 6.3
USB SanDisk SD Adapter w/Transcend 4G MicroSD 6.4 1.5-4.6
USB SanDisk SD Adapter w/ADATA 2G MicroSD 3.8 4.1
USB SanDisk SD Adapter w/ADATA 4G MicroSD 6.4 4.5

Notes

The USB speed is limited to 6.4 MB/sec by a couple of factors that I know of. First, the max-transfer value for the OFW USB storage driver is relatively small - on the order of 16KiB, compared to the SD driver's max-transfer of 64KiB. Second, the OFW USB mass storage driver issues three separate USB transactions for each read or write operation (command, data, status). If the driver were more clever, it could combine those three in one descriptor chain and save some software overhead.

For the cards that are labeled "class 2", there is some suspicion that they are really mis-labeled class 6 cards. We had a mis-labeled batch around the time that I got those cards.

Observations

The regular-size SD cards seem to consistently outperform the MicroSD cards on writes by a factor of about 2.5!

The fs-update time tracks the measured write speedy. There is a lower limit to the fs-update time based on the read speed of the USB stick that contains the ".zd" source file.

Future Work

Would the results change if a different set of blocks - not beginning at 0 - were tested?

Would the age (number of previous reads/writes) of the card affect the results?