On Friday 08 July 2011, Peter Warasin wrote:
hi arnd and list
here are my values for 4GB class4 sandisk on armv5tel (marvell kirkwood Feroceon 88FR131 rev 1 (v5l)) running 2.6.32.29
cat /sys/block/mmcblk*/device/{manfid,oemid,name,serial,date} 0x000003 0x5344 SU04G 0x03a847f0 10/2010
./flashbench -O --open-au-nr=1 /dev/mmcblk0p3 4MiB 9.06M/s 2MiB 9.23M/s 1MiB 8.88M/s 512KiB 9M/s 256KiB 8.86M/s 128KiB 9.48M/s 64KiB 9.48M/s 32KiB 8.29M/s 16KiB 3.14M/s
./flashbench -O --open-au-nr=2 /dev/mmcblk0p3 4MiB 2.08M/s 2MiB 2.21M/s 1MiB 6.72M/s 512KiB 9.4M/s 256KiB 8.72M/s 128KiB 9.04M/s 64KiB 9.49M/s 32KiB 8.31M/s 16KiB 2.34M/s
Ok. evidently, the card can deal with two concurrently open 4 MB erase blocks
./flashbench -O --open-au-nr=3 /dev/mmcblk0p3 4MiB 2.79M/s 2MiB 2.36M/s 1MiB 2.39M/s 512KiB 3.04M/s 256KiB 2.31M/s 128KiB 2.04M/s 64KiB 2.48M/s 32KiB 2.06M/s 16KiB 1.32M/s
but there is a problem using three or more. However, the performance is still basically constant, so the card is doing something smart. It's probably using the new Sandisk trick with SLC and MLC areas. On the one hand, this is good news, because the card doesn't behave that badly, on the other hand it's not easy to measure and the baseline of 2 MB/s is rather slow.
./flashbench -O --open-au-nr=4 /dev/mmcblk0p3 4MiB 3.34M/s 2MiB 2.32M/s 1MiB 2.37M/s 512KiB 2.46M/s 256KiB 1.52M/s 128KiB 3.17M/s 64KiB 2.44M/s 32KiB 1.88M/s 16KiB 1.01M/s
./flashbench -O --open-au-nr=5 /dev/mmcblk0p3 4MiB 1.86M/s 2MiB 2.18M/s 1MiB 1.96M/s 512KiB 1.73M/s 256KiB 1.49M/s 128KiB 1.82M/s 64KiB 2.12M/s 32KiB 1.73M/s 16KiB 829K/s
./flashbench -O --open-au-nr=8 /dev/mmcblk0p3 4MiB 2M/s 2MiB 2.09M/s 1MiB 1.27M/s 512KiB 875K/s 256KiB 836K/s 128KiB 946K/s 64KiB 978K/s 32KiB 788K/s 16KiB 708K/s
./flashbench -O --open-au-nr=10 /dev/mmcblk0p3 4MiB 1.53M/s 2MiB 1.92M/s 1MiB 1.15M/s 512KiB 723K/s 256KiB 710K/s 128KiB 562K/s 64KiB 579K/s 32KiB 270K/s 16KiB 245K/s
It's still not all that bad. If you want to try other things, first of all try the same with the class 10 card. Also, add the '--random' flag to see if it changes anything. Any measurements with '--random' are more likely to be useful than those without, but it may be that the class 10 card won't like that argument and becomes extremely slow.
You can get measurements for smaller block sizes in addition to the values down to 16KB by passing --blocksize=512. This may get rather slow towards the end, but is very relevant because the block size used by ext3 is only 4KiB.
When you pass --random, you can also try different erase block sizes. 4 MB is the default and the most likely one as you can see from the table, but you can also try with '--erasesize=$[2*1024*1024]' and '--erasesize=$[8*1024*1024]' for comparison.
On some cards, you can detect the correct erase size by running the '-a' test, but this often doesn't work on Sandisk.
Arnd