SD and USB FLASH Drive Performance
This page records some performance tests I did on SD cards and USB storage devices.
Background: Performance, longevity and cost
Evaluating the performance of solid state disks, we need to consider performance together with longevity and cost. If you are reading this page, you should be also familiar with our NAND Testing page which covers heavy-duty tests to understand the longevity of the wear-levelling technology in each card.
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 os201.zd min:sec |
Notes |
---|---|---|---|---|
SD SanDisk ExtremeIII 2G | 20 | 18 | Mfg ID: 0x3 OEM ID: SD Name: SD02G Rev: 8.0 Date: 2007-9 SN: 0x2083a7c8 | |
SD SanDisk ExtremeIII 4G | 20 | 17 | Mfg ID: 0x3 OEM ID: SD Name: SD04G Rev: 8.0 Date: 2008-12 SN: 0x50a19f35 | |
SD SanDisk ExtremeIII 8G | 20 | 12-17 | Mfg ID: 0x3 OEM ID: SD Name: SD08G Rev: 8.0 Date: 2008-12 SN: 0x6051fd1c | |
SD Transcend 4G "150x" | 21 | 17 | 06:28 | Mfg ID: 0x1c OEM ID: SV Name: SDC Rev: 1.0 Date: 2007-1 SN: 0x1fb99 |
MicroSD SanDisk 4G "class 2" | 20 | 6-7 | 10:11 | Mfg ID: 0x3 OEM ID: SD Name: SU04G Rev: 8.0 Date: 2009-6 SN: 0x2e5501
Card sample given to wmb by wad during XO-1.5 early prototype build. |
MicroSD SanDisk 4G "Class 2" | 7.2 | 3.8 | 19:25 | Mfg ID: 0x1b OEM ID: SM Name: 00000 Rev: 1.0 Date: 2009-11
From an XO-1.5 built on May 15, 2010 -- tested on internal slot by Martin. |
MicroSD ADATA 2G | 11-15 | 6 | Mfg ID: 0x1b OEM ID: SM Name: 00000 Rev: 1.0 Date: 2010-5 SN: 0x2b060bfe | |
MicroSD ADATA 4G | 17 | 8 | 08:31 | Mfg ID: 0x1d OEM ID: AD Name: SD Rev: 1.0 Date: 2010-4 SN: 0x211012f2 |
Unmarked card from CL1C | 16.7 | 11.8 | about 11 | Mfg ID: 0x3 OEM ID: SD Name: SU04G Rev: 8.0 Rev:2010-1
Wad says they are Adata 4GB Class 6, but ID suggests SanDisk |
MicroSD Transcend 4G "class 2" | 20 | 7 | 10:00 | Mfg ID: 0x3 OEM ID: SD Name: SU04G Rev: 8.0 Date: 2009-8 SN: 0x70e2afd1 |
MicroSD Kingston 2G | 21 | 7 | Mfg ID: 0x2 OEM ID: TM Name: SD02G Rev: 3.2 Date: 2008-1 SN: 0xa5f880b6 | |
SD Panasonic 512M "PRO HIGH SPEED" (old) | 18 | 12 | Mfg ID: 0x1 OEM ID: PA Name: SK512 Rev: 6.4 Date: 2006-5 SN: 0xa8e53841 | |
SD SanDisk 32M (old) | 1.6 | 0.9 | Mfg ID: 0x0 OEM ID: SD Name: SD032 Rev: 3.1 Date: 2003-3 SN: 0x48d46772 | |
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?