On Tue, Mar 15, 2011 at 04:38:06PM +0100, Arnd Bergmann wrote:
I should extend the README file that comes with flashbench, but haven't gotten to that. The basic steps are always:
- find out erase block size
- find number of open erase blocks (random and linear)
- find possible FAT optimized area
- get identification from card (name, size, usb id) where applicable
Here are the first results for "Kingston 4GB 133X elite pro CF/4GB-S2":
tmp179:~ # cat /proc/partitions major minor #blocks name 8 32 3940272 sdc 8 33 3936240 sdc1 tmp179:~ # ./flashbench -a -b 1024 /dev/sdc sched_setscheduler: Operation not permitted align 134217728 pre 507µs on 760µs post 481µs diff 266µs align 67108864 pre 504µs on 754µs post 481µs diff 262µs align 33554432 pre 505µs on 753µs post 479µs diff 261µs align 16777216 pre 506µs on 753µs post 480µs diff 260µs align 8388608 pre 506µs on 754µs post 479µs diff 261µs align 4194304 pre 505µs on 758µs post 479µs diff 266µs align 2097152 pre 505µs on 756µs post 480µs diff 263µs align 1048576 pre 505µs on 673µs post 485µs diff 178µs align 524288 pre 510µs on 671µs post 484µs diff 174µs align 262144 pre 506µs on 674µs post 483µs diff 180µs align 131072 pre 507µs on 666µs post 486µs diff 170µs align 65536 pre 497µs on 668µs post 478µs diff 181µs align 32768 pre 503µs on 666µs post 480µs diff 174µs align 16384 pre 497µs on 668µs post 481µs diff 179µs align 8192 pre 503µs on 666µs post 478µs diff 176µs align 4096 pre 493µs on 491µs post 489µs diff 171ns align 2048 pre 481µs on 487µs post 489µs diff 2.21µs
Excellent: Here you can see very clearly by looking at the final column that the card has a 2 MB erase block size and a 4 KB page size.
Doing the tests --findfat and --open-au tests with --erasesize=$[2 * 1024 * 1024] and --blocksize=4096 should be very straightforward on this one. My personal guess from having worked with Kingston SD cards is that that it will be much worse than the Transcend card.
Here you are :
Just a small remark : when I run --open-au with a high --open-au-nr= value (here higher than 4 or 5), it takes a very very long time to complete for the smaller block size.
tmp179:~ # smartctl --all -T permissive /dev/sdc smartctl 5.40 2010-10-16 r3189 [i686-pc-linux-gnu] (SUSE RPM) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION === Device Model: ELITE PRO CF CARD 4GB Serial Number: 5B921800 Firmware Version: Ver2.21K User Capacity: 4,034,838,528 bytes Device is: Not in smartctl database [for details use: -P showall] ATA Version is: [No Information Found] ATA Standard is: [No Information Found] Local Time is: Tue Mar 15 17:25:49 2011 CET SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported. SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled. Checking to be sure by trying SMART RETURN STATUS command. SMART support is: Unknown - Try option -s with argument 'on' to enable it. A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. tmp179:~ # for i in `seq 1 10`; do echo $i; ./flashbench --open-au --open-au-nr=$i --erasesize=$[2 * 1024 * 1024] --blocksize=4096 /dev/sdc --random; done 1 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 4.07M/s 512KiB 3.2M/s 256KiB 2.69M/s 128KiB 2.99M/s 64KiB 3.66M/s 32KiB 3M/s 16KiB 2.66M/s 8KiB 2.08M/s 4KiB 1.29M/s 2 sched_setscheduler: Operation not permitted 2MiB 4.08M/s 1MiB 4.07M/s 512KiB 3.19M/s 256KiB 2.68M/s 128KiB 3.01M/s 64KiB 3.66M/s 32KiB 3M/s 16KiB 2.66M/s 8KiB 2.08M/s 4KiB 1.29M/s 3 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 4.07M/s 512KiB 3.2M/s 256KiB 2.69M/s 128KiB 3M/s 64KiB 3.66M/s 32KiB 3.01M/s 16KiB 2.67M/s 8KiB 2.08M/s 4KiB 1.29M/s 4 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 4.07M/s 512KiB 3.2M/s 256KiB 2.69M/s 128KiB 3M/s 64KiB 3.67M/s 32KiB 3.01M/s 16KiB 2.67M/s 8KiB 2.09M/s 4KiB 1.3M/s 5 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.74M/s 512KiB 2.69M/s 256KiB 1.54M/s 128KiB 924K/s 64KiB 450K/s 32KiB 232K/s 16KiB 116K/s 8KiB 52.9K/s 4KiB 26.7K/s 6 sched_setscheduler: Operation not permitted 2MiB 4.08M/s 1MiB 3.65M/s 512KiB 2.62M/s 256KiB 1.53M/s 128KiB 908K/s 64KiB 448K/s 32KiB 231K/s 16KiB 117K/s 8KiB 53.7K/s 4KiB 27K/s 7 sched_setscheduler: Operation not permitted 2MiB 4.08M/s 1MiB 3.58M/s 512KiB 2.56M/s 256KiB 1.5M/s 128KiB 894K/s 64KiB 446K/s 32KiB 230K/s 16KiB 116K/s 8KiB 53.7K/s 4KiB 27K/s 8 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.53M/s 512KiB 2.52M/s 256KiB 1.48M/s 128KiB 875K/s 64KiB 442K/s 32KiB 228K/s 16KiB 115K/s 8KiB 53.8K/s 4KiB 27K/s 9 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.49M/s 512KiB 2.48M/s 256KiB 1.48M/s 128KiB 863K/s 64KiB 439K/s 32KiB 227K/s 16KiB 115K/s 8KiB 53.8K/s 4KiB 27K/s 10 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.46M/s 512KiB 2.46M/s 256KiB 1.47M/s 128KiB 857K/s 64KiB 439K/s 32KiB 226K/s 16KiB 115K/s 8KiB 53.6K/s 4KiB 26.9K/s tmp179:~ # for i in `seq 1 10`; do echo $i; ./flashbench --open-au --open-au-nr=$i --erasesize=$[2 * 1024 * 1024] --blocksize=4096 /dev/sdc; done 1 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 4.06M/s 512KiB 4.07M/s 256KiB 4.06M/s 128KiB 4.06M/s 64KiB 4.01M/s 32KiB 3.82M/s 16KiB 3.56M/s 8KiB 3.06M/s 4KiB 2.01M/s 2 sched_setscheduler: Operation not permitted 2MiB 4.08M/s 1MiB 4.06M/s 512KiB 4.07M/s 256KiB 4.07M/s 128KiB 4.07M/s 64KiB 4.01M/s 32KiB 3.82M/s 16KiB 3.56M/s 8KiB 3.13M/s 4KiB 2.01M/s 3 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 4.07M/s 512KiB 4.07M/s 256KiB 4.07M/s 128KiB 4.07M/s 64KiB 4.01M/s 32KiB 3.82M/s 16KiB 3.56M/s 8KiB 3.12M/s 4KiB 2.01M/s 4 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 4.07M/s 512KiB 4.07M/s 256KiB 4.07M/s 128KiB 4.07M/s 64KiB 4.01M/s 32KiB 3.82M/s 16KiB 3.55M/s 8KiB 3.13M/s 4KiB 2.01M/s 5 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.74M/s 512KiB 2.72M/s 256KiB 1.76M/s 128KiB 1.03M/s 64KiB 554K/s 32KiB 282K/s 16KiB 141K/s 8KiB 53.8K/s 4KiB 27.1K/s 6 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.65M/s 512KiB 2.63M/s 256KiB 1.69M/s 128KiB 986K/s 64KiB 534K/s 32KiB 276K/s 16KiB 137K/s 8KiB 54.2K/s 4KiB 27.3K/s 7 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.58M/s 512KiB 2.58M/s 256KiB 1.65M/s 128KiB 957K/s 64KiB 517K/s 32KiB 266K/s 16KiB 134K/s 8KiB 54.2K/s 4KiB 27.3K/s 8 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.54M/s 512KiB 2.53M/s 256KiB 1.62M/s 128KiB 938K/s 64KiB 506K/s 32KiB 260K/s 16KiB 130K/s 8KiB 54.4K/s 4KiB 27.3K/s 9 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.49M/s 512KiB 2.5M/s 256KiB 1.59M/s 128KiB 921K/s 64KiB 496K/s 32KiB 256K/s 16KiB 128K/s 8KiB 54.4K/s 4KiB 27.3K/s 10 sched_setscheduler: Operation not permitted 2MiB 4.07M/s 1MiB 3.46M/s 512KiB 2.47M/s 256KiB 1.57M/s 128KiB 907K/s 64KiB 488K/s 32KiB 252K/s 16KiB 127K/s 8KiB 54.2K/s 4KiB 27.3K/s tmp179:~ # ./flashbench --findfat --fat-nr=10 --erasesize=$[2 * 1024 * 1024] /dev/sdc --random --blocksize=512 sched_setscheduler: Operation not permitted 2MiB 3.14M/s 4.07M/s 4.07M/s 4.07M/s 4.07M/s 4.06M/s 4.06M/s 4.06M/s 2.53M/s 4.08M/s 1MiB 3.64M/s 3.65M/s 3.15M/s 3.15M/s 3.34M/s 3.34M/s 3.33M/s 3.34M/s 3.34M/s 3.35M/s 512KiB 2.67M/s 2.68M/s 2.68M/s 2.66M/s 2.61M/s 2.6M/s 2.6M/s 2.62M/s 2.62M/s 2.63M/s 256KiB 2.33M/s 2.33M/s 2.34M/s 2.34M/s 2.33M/s 2.31M/s 2.32M/s 2.33M/s 2.32M/s 2.3M/s 128KiB 2.81M/s 2.8M/s 2.82M/s 2.8M/s 2.81M/s 2.82M/s 2.81M/s 2.81M/s 2.8M/s 2.82M/s 64KiB 3.44M/s 3.46M/s 3.44M/s 3.46M/s 3.45M/s 3.43M/s 3.44M/s 3.45M/s 3.46M/s 3.43M/s 32KiB 3.11M/s 3.1M/s 3.09M/s 3.09M/s 3.11M/s 3.09M/s 3.1M/s 3.08M/s 3.1M/s 3.09M/s 16KiB 2.65M/s 2.65M/s 2.64M/s 2.64M/s 2.64M/s 2.65M/s 2.64M/s 2.66M/s 2.65M/s 2.64M/s 8KiB 1.69M/s 2.06M/s 2.07M/s 2.06M/s 2.06M/s 2.09M/s 2.1M/s 2.09M/s 2.1M/s 2.12M/s 4KiB 1.31M/s 1.32M/s 1.31M/s 1.32M/s 1.31M/s 1.31M/s 1.31M/s 1.32M/s 1.33M/s 1.31M/s 2KiB 806K/s 806K/s 793K/s 792K/s 805K/s 793K/s 800K/s 795K/s 801K/s 797K/s 1KiB 445K/s 449K/s 449K/s 446K/s 452K/s 448K/s 447K/s 447K/s 448K/s 450K/s 512B 237K/s 235K/s 234K/s 234K/s 235K/s 235K/s 237K/s 237K/s 236K/s 235K/s tmp179:~ # ./flashbench --findfat --fat-nr=10 --erasesize=$[2 * 1024 * 1024] /dev/sdc --random sched_setscheduler: Operation not permitted 2MiB 3.16M/s 4.06M/s 4.08M/s 4.08M/s 4.08M/s 2.63M/s 4.06M/s 2.63M/s 4.07M/s 2.62M/s 1MiB 3.63M/s 3.63M/s 3.64M/s 3.63M/s 3.34M/s 3.34M/s 3.33M/s 3.35M/s 3.34M/s 3.35M/s 512KiB 2.66M/s 2.66M/s 2.67M/s 2.67M/s 2.6M/s 2.61M/s 2.61M/s 2.61M/s 2.61M/s 2.61M/s 256KiB 2.34M/s 2.32M/s 2.31M/s 2.33M/s 2.32M/s 2.31M/s 2.29M/s 2.32M/s 2.32M/s 2.31M/s 128KiB 2.8M/s 2.8M/s 2.81M/s 2.81M/s 2.8M/s 2.81M/s 2.81M/s 2.78M/s 2.81M/s 2.81M/s 64KiB 3.43M/s 3.44M/s 3.46M/s 3.42M/s 3.44M/s 3.45M/s 3.43M/s 3.43M/s 3.43M/s 3.45M/s 32KiB 3.07M/s 3.09M/s 3.08M/s 3.09M/s 3.07M/s 3.09M/s 3.08M/s 3.08M/s 3.07M/s 3.08M/s 16KiB 2.61M/s 2.63M/s 2.63M/s 2.63M/s 2.63M/s 2.63M/s 2.61M/s 2.61M/s 2.64M/s 2.63M/s tmp179:~ #
Philippe