Hi again, I've tested another SDHC card. But this time it was a class-4 mini-SDHC with 8GB. The card is a very cheap one from the German drugstore DM. (No, usually I do not buy my electronics in drugstores ;-) - just a backup card.)
Ok, here are the results. I'm not sure, if my interpretation of them is right.
I've read, that the choice of the underlaying filesystem depends on the amount of open erase blocks. Is there any rule of best practice for choosing the right filesystem for a particular sd card?
Some feedback would be nice! Bye, Holger
$ fdisk -l /dev/sdc
Disk /dev/sdc: 7948 MB, 7948206080 bytes 255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
$ ./flashbench -a /dev/sdc --blocksize=1024 align 2147483648 pre 825µs on 1.19ms post 851µs diff 347µs align 1073741824 pre 841µs on 1.18ms post 830µs diff 341µs align 536870912 pre 821µs on 1.14ms post 779µs diff 341µs align 268435456 pre 842µs on 1.18ms post 818µs diff 346µs align 134217728 pre 832µs on 1.16ms post 799µs diff 346µs align 67108864 pre 860µs on 1.16ms post 822µs diff 321µs align 33554432 pre 832µs on 1.15ms post 802µs diff 331µs align 16777216 pre 783µs on 1.16ms post 824µs diff 359µs align 8388608 pre 807µs on 1.1ms post 781µs diff 303µs align 4194304 pre 817µs on 1.14ms post 786µs diff 340µs align 2097152 pre 847µs on 924µs post 791µs diff 105µs align 1048576 pre 791µs on 935µs post 807µs diff 136µs align 524288 pre 826µs on 906µs post 823µs diff 81.9µs align 262144 pre 810µs on 926µs post 826µs diff 108µs align 131072 pre 832µs on 913µs post 801µs diff 96.5µs align 65536 pre 819µs on 922µs post 830µs diff 97.2µs align 32768 pre 831µs on 941µs post 807µs diff 122µs align 16384 pre 772µs on 918µs post 820µs diff 122µs align 8192 pre 798µs on 845µs post 837µs diff 27µs align 4096 pre 794µs on 823µs post 806µs diff 22.2µs align 2048 pre 836µs on 850µs post 801µs diff 31.7µs
## Looks like 4MB erase blocksize and 16KB page size??
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=1 4MiB 5.41M/s 2MiB 8.97M/s 1MiB 5.98M/s 512KiB 17.1M/s 256KiB 10.9M/s 128KiB 4.25M/s 64KiB 2.13M/s 32KiB 1.06M/s 16KiB 545K/s 8KiB 2.07M/s 4KiB 1.76M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=2 4MiB 8.21M/s 2MiB 5.75M/s 1MiB 18.5M/s 512KiB 16.8M/s 256KiB 10.7M/s 128KiB 4.26M/s 64KiB 2.11M/s 32KiB 1.06M/s 16KiB 545K/s 8KiB 2.05M/s 4KiB 1.69M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=3 4MiB 9.18M/s 2MiB 19.1M/s 1MiB 18.7M/s 512KiB 16.5M/s 256KiB 10.8M/s 128KiB 4.23M/s 64KiB 2.11M/s 32KiB 1.06M/s 16KiB 544K/s 8KiB 1.99M/s 4KiB 1.67M/s
$./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=4 4MiB 10.6M/s 2MiB 19.3M/s 1MiB 18.6M/s 512KiB 16.6M/s 256KiB 10.9M/s 128KiB 4.24M/s 64KiB 2.11M/s 32KiB 1.06M/s 16KiB 544K/s 8KiB 1.86M/s 4KiB 1.53M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=5 4MiB 6.1M/s 2MiB 6.68M/s 1MiB 4.39M/s 512KiB 2.96M/s 256KiB 1.95M/s 128KiB 1.02M/s 64KiB 570K/s 32KiB 334K/s 16KiB 167K/s 8KiB 1M/s 4KiB 1.14M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=6 4MiB 7.5M/s 2MiB 4.69M/s 1MiB 3.38M/s 512KiB 2.02M/s 256KiB 1.22M/s 128KiB 688K/s 64KiB 406K/s ^C
## Looks like 4.
$./flashbench /dev/sdc -f --erasesize=$[4*1024*1024] 4MiB 4.11M/s 17.4M/s 16.9M/s 5.62M/s 5.18M/s 5.2M/s 2MiB 5.02M/s 17.6M/s 17.2M/s 5.32M/s 5.03M/s 5.21M/s 1MiB 5.28M/s 17.2M/s 17.2M/s 5.53M/s 5.21M/s 5M/s 512KiB 5.04M/s 17.4M/s 5.07M/s 5.21M/s 5.27M/s 5.01M/s 256KiB 5.19M/s 17.1M/s 5.02M/s 5.21M/s 5.02M/s 5.21M/s 128KiB 2.35M/s 16.6M/s 4.96M/s 5.22M/s 4.99M/s 5.18M/s 64KiB 4.98M/s 16.6M/s 5.21M/s 4.91M/s 4.97M/s 5.21M/s 32KiB 2.31M/s 14.8M/s 5.11M/s 4.92M/s 5.12M/s 5.2M/s 16KiB 4.81M/s 12.4M/s 5.07M/s 5M/s 5M/s 4.82M/s
## Looks like the second and the third block were faster than the others.
On Sat, 06 Oct 2012 15:13:32 +0200 "Holger Bast" HolgerBast@gmx.de wrote:
I've tested another SDHC card. But this time it was a class-4 mini-SDHC with 8GB. The card is a very cheap one from the German drugstore DM. (No, usually I do not buy my electronics in drugstores ;-) - just a backup card.)
Can you provide brand info, part number, and class rating?
Ok, here are the results. I'm not sure, if my interpretation of them is right.
I've read, that the choice of the underlaying filesystem depends on the amount of open erase blocks. Is there any rule of best practice for choosing the right filesystem for a particular sd card?
btrfs seems to perform best if you have 3 or more open erase block ability. ext4 isn't quite as good but still much better than ext3.
If you only have 1 open erase block, FAT is really the only choice I know of to get decent performance but then you trade off quite a lot in normal *nix operation, like permissions on files.
$ fdisk -l /dev/sdc
Disk /dev/sdc: 7948 MB, 7948206080 bytes 255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Can you try this card in an sd/mmc reader that shows up as /dev/mmcblk device in Linux? If so, can you run
$ head /sys/block/mmcblk0/device/* 2>/dev/null | grep -v ^$
$ ./flashbench -a /dev/sdc --blocksize=1024 align 2147483648 pre 825µs on 1.19ms post 851µs diff 347µs align 1073741824 pre 841µs on 1.18ms post 830µs diff 341µs align 536870912 pre 821µs on 1.14ms post 779µs diff 341µs align 268435456 pre 842µs on 1.18ms post 818µs diff 346µs align 134217728 pre 832µs on 1.16ms post 799µs diff 346µs align 67108864 pre 860µs on 1.16ms post 822µs diff 321µs align 33554432 pre 832µs on 1.15ms post 802µs diff 331µs align 16777216 pre 783µs on 1.16ms post 824µs diff 359µs align 8388608 pre 807µs on 1.1ms post 781µs diff 303µs align 4194304 pre 817µs on 1.14ms post 786µs diff 340µs align 2097152 pre 847µs on 924µs post 791µs diff 105µs align 1048576 pre 791µs on 935µs post 807µs diff 136µs align 524288 pre 826µs on 906µs post 823µs diff 81.9µs align 262144 pre 810µs on 926µs post 826µs diff 108µs align 131072 pre 832µs on 913µs post 801µs diff 96.5µs align 65536 pre 819µs on 922µs post 830µs diff 97.2µs align 32768 pre 831µs on 941µs post 807µs diff 122µs align 16384 pre 772µs on 918µs post 820µs diff 122µs align 8192 pre 798µs on 845µs post 837µs diff 27µs align 4096 pre 794µs on 823µs post 806µs diff 22.2µs align 2048 pre 836µs on 850µs post 801µs diff 31.7µs
## Looks like 4MB erase blocksize and 16KB page size??
Appears so.
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=1 4MiB 5.41M/s 2MiB 8.97M/s 1MiB 5.98M/s 512KiB 17.1M/s 256KiB 10.9M/s 128KiB 4.25M/s 64KiB 2.13M/s 32KiB 1.06M/s 16KiB 545K/s 8KiB 2.07M/s 4KiB 1.76M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=2 4MiB 8.21M/s 2MiB 5.75M/s 1MiB 18.5M/s 512KiB 16.8M/s 256KiB 10.7M/s 128KiB 4.26M/s 64KiB 2.11M/s 32KiB 1.06M/s 16KiB 545K/s 8KiB 2.05M/s 4KiB 1.69M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=3 4MiB 9.18M/s 2MiB 19.1M/s 1MiB 18.7M/s 512KiB 16.5M/s 256KiB 10.8M/s 128KiB 4.23M/s 64KiB 2.11M/s 32KiB 1.06M/s 16KiB 544K/s 8KiB 1.99M/s 4KiB 1.67M/s
$./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=4 4MiB 10.6M/s 2MiB 19.3M/s 1MiB 18.6M/s 512KiB 16.6M/s 256KiB 10.9M/s 128KiB 4.24M/s 64KiB 2.11M/s 32KiB 1.06M/s 16KiB 544K/s 8KiB 1.86M/s 4KiB 1.53M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=5 4MiB 6.1M/s 2MiB 6.68M/s 1MiB 4.39M/s 512KiB 2.96M/s 256KiB 1.95M/s 128KiB 1.02M/s 64KiB 570K/s 32KiB 334K/s 16KiB 167K/s 8KiB 1M/s 4KiB 1.14M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[4*1024*1024] --blocksize=$[4*1024] --random --open-au-nr=6 4MiB 7.5M/s 2MiB 4.69M/s 1MiB 3.38M/s 512KiB 2.02M/s 256KiB 1.22M/s 128KiB 688K/s 64KiB 406K/s ^C
## Looks like 4.
Yes, for random.
Can you run the --open-au tests without --random?
$./flashbench /dev/sdc -f --erasesize=$[4*1024*1024] 4MiB 4.11M/s 17.4M/s 16.9M/s 5.62M/s 5.18M/s 5.2M/s 2MiB 5.02M/s 17.6M/s 17.2M/s 5.32M/s 5.03M/s 5.21M/s 1MiB 5.28M/s 17.2M/s 17.2M/s 5.53M/s 5.21M/s 5M/s 512KiB 5.04M/s 17.4M/s 5.07M/s 5.21M/s 5.27M/s 5.01M/s 256KiB 5.19M/s 17.1M/s 5.02M/s 5.21M/s 5.02M/s 5.21M/s 128KiB 2.35M/s 16.6M/s 4.96M/s 5.22M/s 4.99M/s 5.18M/s 64KiB 4.98M/s 16.6M/s 5.21M/s 4.91M/s 4.97M/s 5.21M/s 32KiB 2.31M/s 14.8M/s 5.11M/s 4.92M/s 5.12M/s 5.2M/s 16KiB 4.81M/s 12.4M/s 5.07M/s 5M/s 5M/s 4.82M/s
## Looks like the second and the third block were faster than the others.
Looks like just the 2nd is faster through the entire test, but the 3rd is faster only at larger sizes.
-Andrew
flashbench-results@lists.linaro.org