Hi guys
****************************************************** **** SanDisk mobile ultra microSDHC class 4, 8 GB **** ******************************************************
==> /sys/block/mmcblk0/device/cid <== 0353445355303847800c2dc23b00ac00
==> /sys/block/mmcblk0/device/csd <== 400e00325b5900003b377f800a404000
==> /sys/block/mmcblk0/device/scr <== 0235800100000000
==> /sys/block/mmcblk0/device/fwrev <== 0x0
==> /sys/block/mmcblk0/device/hwrev <== 0x8
==> /sys/block/mmcblk0/device/cid <== 0353445355303847800c2dc23b00ac00
==> /sys/block/mmcblk0/device/manfid <== 0x000003
==> /sys/block/mmcblk0/device/oemid <== 0x5344
==> /sys/block/mmcblk0/device/serial <== 0x0c2dc23b
==> /sys/block/mmcblk0/device/erase_size <== 512
==> /sys/block/mmcblk0/device/preferred_erase_size <== 4194304
==> /sys/block/mmcblk0/device/name <== SU08G
==> /sys/block/mmcblk0/device/date <== 12/2010 clock: 33000000 Hz vdd: 20 (3.2 ~ 3.3 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed)
$ ./flashbench -a /dev/sda3 --count=100 align 134217728 pre 1.86ms on 2.23ms post 1.82ms diff 388µs align 67108864 pre 1.86ms on 2.23ms post 1.82ms diff 388µs align 33554432 pre 1.86ms on 2.23ms post 1.83ms diff 387µs align 16777216 pre 1.86ms on 2.23ms post 1.83ms diff 385µs align 8388608 pre 1.86ms on 2.24ms post 1.83ms diff 389µs align 4194304 pre 1.87ms on 1.98ms post 1.87ms diff 113µs align 2097152 pre 1.87ms on 1.87ms post 1.87ms diff -3574ns align 1048576 pre 1.87ms on 1.86ms post 1.87ms diff -4139ns align 524288 pre 1.87ms on 1.87ms post 1.87ms diff -414ns align 262144 pre 1.86ms on 1.87ms post 1.86ms diff 4.4µs align 131072 pre 1.86ms on 1.87ms post 1.87ms diff 2.04µs align 65536 pre 1.87ms on 1.86ms post 1.87ms diff -2116ns align 32768 pre 1.87ms on 1.87ms post 1.87ms diff 3.03µs
-> erase-block size 4MiB
./flashbench --open-au --open-au-nr=1 --blocksize=2048 /dev/sda3 4MiB 6.56M/s 2MiB 6.06M/s 1MiB 11.1M/s 512KiB 12M/s 256KiB 11.7M/s 128KiB 10.7M/s 64KiB 17.2M/s 32KiB 13.1M/s 16KiB 9.51M/s 8KiB 3.2M/s 4KiB 1.79M/s 2KiB 975K/s
./flashbench --open-au --open-au-nr=2 --blocksize=2048 /dev/sda3 4MiB 10.9M/s 2MiB 10.6M/s 1MiB 11.2M/s 512KiB 11.9M/s 256KiB 12M/s 128KiB 11.2M/s 64KiB 15.1M/s 32KiB 12.9M/s 16KiB 8.77M/s 8KiB 3.16M/s 4KiB 1.8M/s 2KiB 970K/s
./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 4MiB 6.89M/s 2MiB 10.7M/s 1MiB 11.3M/s 512KiB 11.9M/s 256KiB 12.1M/s 128KiB 11.1M/s 64KiB 14M/s 32KiB 12.6M/s 16KiB 9.26M/s 8KiB 3.16M/s 4KiB 1.78M/s 2KiB 857K/s
./flashbench --open-au --open-au-nr=4 --blocksize=2048 /dev/sda3 4MiB 6.86M/s 2MiB 4.83M/s 1MiB 4.03M/s 512KiB 4.16M/s 256KiB 4.04M/s 128KiB 4.13M/s 64KiB 5.44M/s 32KiB 5.03M/s 16KiB 4.42M/s 8KiB 2.31M/s 4KiB 1.45M/s 2KiB 873K/s
./flashbench --open-au --open-au-nr=5 --blocksize=2048 /dev/sda3 4MiB 6.39M/s 2MiB 3.08M/s 1MiB 2.24M/s 512KiB 2.62M/s 256KiB 2.37M/s 128KiB 2.35M/s 64KiB 2.9M/s 32KiB 3.79M/s 16KiB 2.9M/s 8KiB 1.97M/s 4KiB 1.24M/s 2KiB 775K/s
./flashbench --open-au --open-au-nr=6 --blocksize=2048 /dev/sda3 4MiB 3.96M/s 2MiB 2.79M/s 1MiB 1.74M/s 512KiB 1.59M/s 256KiB 1.54M/s 128KiB 1.55M/s 64KiB 211K/s 32KiB 2.21M/s 16KiB 2.36M/s 8KiB 1.69M/s 4KiB 1.28M/s 2KiB 697K/s
-> can deal with 3 open erase blocks
$ ./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 --random 4MiB 3.72M/s 2MiB 3.27M/s 1MiB 11.1M/s 512KiB 2.72M/s 256KiB 1.18M/s 128KiB 2.2M/s 64KiB 1.25M/s 32KiB 609K/s 16KiB 389K/s 8KiB 1.31M/s 4KiB 809K/s 2KiB 416K/s
./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 --random 4MiB 10.9M/s 2MiB 10.8M/s 1MiB 11.3M/s 512KiB 2.72M/s 256KiB 1.18M/s 128KiB 2.25M/s 64KiB 1.25M/s 32KiB 608K/s 16KiB 389K/s 8KiB 1.32M/s 4KiB 810K/s 2KiB 419K/s
./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 --random 4MiB 10.9M/s 2MiB 10.6M/s 1MiB 11.3M/s 512KiB 2.71M/s 256KiB 1.18M/s 128KiB 2.25M/s 64KiB 1.25M/s 32KiB 604K/s 16KiB 389K/s 8KiB 1.33M/s 4KiB 811K/s 2KiB 418K/s
-> seems quite stable for --random.. was the GC maybe running on first try?
peter
On Tuesday 12 July 2011, Peter Warasin wrote:
$ ./flashbench -a /dev/sda3 --count=100 align 134217728 pre 1.86ms on 2.23ms post 1.82ms diff 388µs align 67108864 pre 1.86ms on 2.23ms post 1.82ms diff 388µs align 33554432 pre 1.86ms on 2.23ms post 1.83ms diff 387µs align 16777216 pre 1.86ms on 2.23ms post 1.83ms diff 385µs align 8388608 pre 1.86ms on 2.24ms post 1.83ms diff 389µs align 4194304 pre 1.87ms on 1.98ms post 1.87ms diff 113µs align 2097152 pre 1.87ms on 1.87ms post 1.87ms diff -3574ns align 1048576 pre 1.87ms on 1.86ms post 1.87ms diff -4139ns align 524288 pre 1.87ms on 1.87ms post 1.87ms diff -414ns align 262144 pre 1.86ms on 1.87ms post 1.86ms diff 4.4µs align 131072 pre 1.86ms on 1.87ms post 1.87ms diff 2.04µs align 65536 pre 1.87ms on 1.86ms post 1.87ms diff -2116ns align 32768 pre 1.87ms on 1.87ms post 1.87ms diff 3.03µs
-> erase-block size 4MiB
I would guess 8MB, but either one is possible: There is a large jump between 8MB and 4MB, and a smaller one between 4MB and 2MB. The diff column is basically noise below 4MB.
./flashbench --open-au --open-au-nr=1 --blocksize=2048 /dev/sda3 4MiB 6.56M/s 2MiB 6.06M/s 1MiB 11.1M/s 512KiB 12M/s 256KiB 11.7M/s 128KiB 10.7M/s 64KiB 17.2M/s 32KiB 13.1M/s 16KiB 9.51M/s 8KiB 3.2M/s 4KiB 1.79M/s 2KiB 975K/s
./flashbench --open-au --open-au-nr=2 --blocksize=2048 /dev/sda3 4MiB 10.9M/s 2MiB 10.6M/s 1MiB 11.2M/s 512KiB 11.9M/s 256KiB 12M/s 128KiB 11.2M/s 64KiB 15.1M/s 32KiB 12.9M/s 16KiB 8.77M/s 8KiB 3.16M/s 4KiB 1.8M/s 2KiB 970K/s
./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 4MiB 6.89M/s 2MiB 10.7M/s 1MiB 11.3M/s 512KiB 11.9M/s 256KiB 12.1M/s 128KiB 11.1M/s 64KiB 14M/s 32KiB 12.6M/s 16KiB 9.26M/s 8KiB 3.16M/s 4KiB 1.78M/s 2KiB 857K/s
./flashbench --open-au --open-au-nr=4 --blocksize=2048 /dev/sda3 4MiB 6.86M/s 2MiB 4.83M/s 1MiB 4.03M/s 512KiB 4.16M/s 256KiB 4.04M/s 128KiB 4.13M/s 64KiB 5.44M/s 32KiB 5.03M/s 16KiB 4.42M/s 8KiB 2.31M/s 4KiB 1.45M/s 2KiB 873K/s
./flashbench --open-au --open-au-nr=5 --blocksize=2048 /dev/sda3 4MiB 6.39M/s 2MiB 3.08M/s 1MiB 2.24M/s 512KiB 2.62M/s 256KiB 2.37M/s 128KiB 2.35M/s 64KiB 2.9M/s 32KiB 3.79M/s 16KiB 2.9M/s 8KiB 1.97M/s 4KiB 1.24M/s 2KiB 775K/s
./flashbench --open-au --open-au-nr=6 --blocksize=2048 /dev/sda3 4MiB 3.96M/s 2MiB 2.79M/s 1MiB 1.74M/s 512KiB 1.59M/s 256KiB 1.54M/s 128KiB 1.55M/s 64KiB 211K/s 32KiB 2.21M/s 16KiB 2.36M/s 8KiB 1.69M/s 4KiB 1.28M/s 2KiB 697K/s
-> can deal with 3 open erase blocks
Actually, the later numbers are still pretty good (except the 64KB line). Sandisk cards often do very interesting tricks to keep the behavior stable. I would guess that it will get gradually slower beyond 6 erase blocks, but then get to a drastic cutoff at 10 or so.
The point you are looking for is not where the absolute numbers suck as much as where each line is just half of the previous line, as with the kingston card.
$ ./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 --random 4MiB 3.72M/s 2MiB 3.27M/s 1MiB 11.1M/s 512KiB 2.72M/s 256KiB 1.18M/s 128KiB 2.2M/s 64KiB 1.25M/s 32KiB 609K/s 16KiB 389K/s 8KiB 1.31M/s 4KiB 809K/s 2KiB 416K/s
./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 --random 4MiB 10.9M/s 2MiB 10.8M/s 1MiB 11.3M/s 512KiB 2.72M/s 256KiB 1.18M/s 128KiB 2.25M/s 64KiB 1.25M/s 32KiB 608K/s 16KiB 389K/s 8KiB 1.32M/s 4KiB 810K/s 2KiB 419K/s
./flashbench --open-au --open-au-nr=3 --blocksize=2048 /dev/sda3 --random 4MiB 10.9M/s 2MiB 10.6M/s 1MiB 11.3M/s 512KiB 2.71M/s 256KiB 1.18M/s 128KiB 2.25M/s 64KiB 1.25M/s 32KiB 604K/s 16KiB 389K/s 8KiB 1.33M/s 4KiB 811K/s 2KiB 418K/s
-> seems quite stable for --random.. was the GC maybe running on first try?
Yes, it was.
The Sandisk Class 4 that I have from the same age actually has 1.333 MB erase blocks and can have 10 of them open simultaneously, writing 10M/s to each. When you write large chunks, the data rate drops significantly. See the explanation on "Mixed SLC/MLC flashes" in https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey
In short, this card actually has a pretty good controller, but crappy TLC flash behind it. It should be good for using with ext3, but not so much for writing large files with anything.
Arnd
flashbench-results@lists.linaro.org