Hi, I'm new to the topic of flash benchmarking. I came across reading several articles about this topic, like these in the German Linux Magazin, issue 07/12 and Arnd's linked article on lwn. I'm currently playing around with a Raspberry Pi that needs a SD card to boot from. (first partition FAT32 for the kernel, second something like ext3/ext4 for the rootfs). I would like to get the 'best' perfomance out of it, so I also had a look at the flashbench tool. I made some tests with my 32GB Transcend SDHC card and found out, that the card has a 8MB erase block size and 8KB pages and can handle up to 5 open-au's. (results are listed below)
So what next? The next step for me is to find out, how to align the partitions correctly. I already talked to Andrew (thx! I was wrong with the erase block size.) who send me the following link that points to a script that creates two partitions and aligns them correctly.
Is there anything else I can do? ...or am I wrong?
Bye, Holger -- $ fdisk -l /dev/sdc
Disk /dev/sdc: 32.5 GB, 32462864384 bytes 64 Köpfe, 32 Sektoren/Spur, 30959 Zylinder, zusammen 63404032 Sektoren Einheiten = Sektoren von 1 × 512 = 512 Bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c0bcb
$ ./flashbench -a /dev/sdc --blocksize=1024 align 8589934592 pre 1.04ms on 1.59ms post 1.32ms diff 402µs align 4294967296 pre 1.04ms on 1.67ms post 1.33ms diff 485µs align 2147483648 pre 1.03ms on 1.64ms post 1.31ms diff 468µs align 1073741824 pre 1.02ms on 1.48ms post 1.33ms diff 309µs align 536870912 pre 1.02ms on 1.5ms post 1.35ms diff 320µs align 268435456 pre 1.02ms on 1.49ms post 1.28ms diff 338µs align 134217728 pre 1.02ms on 1.49ms post 1.34ms diff 314µs align 67108864 pre 1.04ms on 1.48ms post 1.27ms diff 332µs align 33554432 pre 1.01ms on 1.5ms post 1.32ms diff 330µs align 16777216 pre 1.04ms on 1.5ms post 1.28ms diff 347µs align 8388608 pre 995µs on 1.51ms post 1.31ms diff 354µs align 4194304 pre 1.02ms on 1.35ms post 1.3ms diff 189µs align 2097152 pre 1.05ms on 1.39ms post 1.31ms diff 209µs align 1048576 pre 1.04ms on 1.37ms post 1.29ms diff 203µs align 524288 pre 1.02ms on 1.36ms post 1.32ms diff 192µs align 262144 pre 1.01ms on 1.33ms post 1.31ms diff 176µs align 131072 pre 1.03ms on 1.35ms post 1.31ms diff 182µs align 65536 pre 1.01ms on 1.33ms post 1.26ms diff 195µs align 32768 pre 1.04ms on 1.37ms post 1.29ms diff 203µs align 16384 pre 1.04ms on 1.36ms post 1.28ms diff 204µs align 8192 pre 1.02ms on 1.3ms post 1.27ms diff 154µs align 4096 pre 1.17ms on 1.16ms post 1.11ms diff 22.6µs align 2048 pre 1.25ms on 1.24ms post 1.2ms diff 20.2µs
## For me it looks like 8MB erase block size and a 8KB page size. With that in mind, I made the following tests:
$ ./flashbench /dev/sdc --open-au --erasesize=$[8*1024*1024] --blocksize=$[8*1024] --open-au-nr=3 --random 8MiB 17M/s 4MiB 17.2M/s 2MiB 16.5M/s 1MiB 15.9M/s 512KiB 15M/s 256KiB 13.1M/s 128KiB 10.7M/s 64KiB 10.9M/s 32KiB 7.84M/s 16KiB 4.87M/s 8KiB 1.79M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[8*1024*1024] --blocksize=$[8*1024] --open-au-nr=4 --random 8MiB 17.4M/s 4MiB 17.1M/s 2MiB 16.8M/s 1MiB 16M/s 512KiB 15M/s 256KiB 13.4M/s 128KiB 10.8M/s 64KiB 10.9M/s 32KiB 7.89M/s 16KiB 4.87M/s 8KiB 1.79M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[8*1024*1024] --blocksize=$[8*1024] --open-au-nr=5 --random 8MiB 10.3M/s 4MiB 17.1M/s 2MiB 16.7M/s 1MiB 16.2M/s 512KiB 15M/s 256KiB 13.3M/s 128KiB 10.9M/s 64KiB 11M/s 32KiB 7.95M/s 16KiB 4.48M/s 8KiB 1.8M/s
$ ./flashbench /dev/sdc --open-au --erasesize=$[8*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random 8MiB 13.4M/s 4MiB 4.27M/s 2MiB 2.26M/s 1MiB 1.2M/s 512KiB 621K/s ^C
## And this looks like 5 open-au in random mode.
$ ./flashbench /dev/sdc -f --erasesize=$[8*1024*1024] 8MiB 17.2M/s 17.8M/s 17.1M/s 17.8M/s 17.5M/s 17.5M/s 4MiB 16.9M/s 17.7M/s 17M/s 17.8M/s 17.5M/s 17.5M/s 2MiB 16.8M/s 17.6M/s 17M/s 17.6M/s 17.5M/s 17.4M/s 1MiB 16.7M/s 17.6M/s 17M/s 17.5M/s 17.4M/s 17.5M/s 512KiB 16.6M/s 17.2M/s 17.4M/s 17.1M/s 16.9M/s 16.5M/s 256KiB 16.4M/s 17M/s 17.2M/s 16.9M/s 16.6M/s 16.6M/s 128KiB 16.5M/s 16.2M/s 16.6M/s 16.3M/s 16.1M/s 16.1M/s 64KiB 16.5M/s 17.1M/s 16.4M/s 17.2M/s 17M/s 17M/s 32KiB 15.4M/s 16.3M/s 15.5M/s 16.1M/s 16M/s 16.1M/s 16KiB 13M/s 13.5M/s 13.2M/s 13.5M/s 13.5M/s 13.5M/s
flashbench-results@lists.linaro.org