I can't interpret the numbers for the AUs, can you help me?
# ./flashbench -a /dev/sde --blocksize=1024 sched_setscheduler: Operation not permitted align 536870912 pre 745µs on 756µs post 696µs diff 36.2µs align 268435456 pre 698µs on 882µs post 670µs diff 198µs align 134217728 pre 722µs on 899µs post 715µs diff 180µs align 67108864 pre 720µs on 712µs post 669µs diff 17.1µs align 33554432 pre 750µs on 765µs post 639µs diff 70.1µs align 16777216 pre 727µs on 777µs post 684µs diff 71.8µs align 8388608 pre 691µs on 727µs post 646µs diff 58.3µs align 4194304 pre 689µs on 769µs post 675µs diff 87.3µs align 2097152 pre 697µs on 879µs post 715µs diff 173µs align 1048576 pre 716µs on 899µs post 789µs diff 147µs align 524288 pre 659µs on 775µs post 724µs diff 83.4µs align 262144 pre 657µs on 735µs post 685µs diff 63.6µs align 131072 pre 656µs on 706µs post 756µs diff -248ns align 65536 pre 655µs on 715µs post 650µs diff 62.3µs align 32768 pre 732µs on 792µs post 743µs diff 54.1µs align 16384 pre 685µs on 808µs post 767µs diff 82.6µs align 8192 pre 732µs on 764µs post 697µs diff 49.8µs align 4096 pre 661µs on 692µs post 681µs diff 20.7µs align 2048 pre 671µs on 657µs post 653µs diff -5465ns
# ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=2 sched_setscheduler: Operation not permitted 4MiB 6.69M/s 2MiB 11.1M/s 1MiB 13.2M/s 512KiB 14.4M/s 256KiB 14.6M/s # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=3 sched_setscheduler: Operation not permitted 4MiB 6.68M/s 2MiB 11.2M/s 1MiB 12.9M/s 512KiB 14.5M/s 256KiB 14.8M/s # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=4 sched_setscheduler: Operation not permitted 4MiB 6.8M/s 2MiB 10.9M/s 1MiB 13M/s 512KiB 14.4M/s 256KiB 14.6M/s # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=6 sched_setscheduler: Operation not permitted 4MiB 7.45M/s 2MiB 9.24M/s 1MiB 16.4M/s 512KiB 17.4M/s 256KiB 7.98M/s
On Thursday 24 March 2011, Michael Monnerie wrote:
I can't interpret the numbers for the AUs, can you help me?
This is usually a sign that the guessed erasesize was incorrect. On some media, it's really hard to find the correct number, especially in the rare cases where it's not a power of two. I've seen one USB stick that uses 4192 KB instead of 4096 KB. I still need to add support for this to flashbench.
# ./flashbench -a /dev/sde --blocksize=1024 sched_setscheduler: Operation not permitted align 536870912 pre 745µs on 756µs post 696µs diff 36.2µs align 268435456 pre 698µs on 882µs post 670µs diff 198µs align 134217728 pre 722µs on 899µs post 715µs diff 180µs align 67108864 pre 720µs on 712µs post 669µs diff 17.1µs align 33554432 pre 750µs on 765µs post 639µs diff 70.1µs align 16777216 pre 727µs on 777µs post 684µs diff 71.8µs align 8388608 pre 691µs on 727µs post 646µs diff 58.3µs align 4194304 pre 689µs on 769µs post 675µs diff 87.3µs align 2097152 pre 697µs on 879µs post 715µs diff 173µs align 1048576 pre 716µs on 899µs post 789µs diff 147µs align 524288 pre 659µs on 775µs post 724µs diff 83.4µs align 262144 pre 657µs on 735µs post 685µs diff 63.6µs align 131072 pre 656µs on 706µs post 756µs diff -248ns align 65536 pre 655µs on 715µs post 650µs diff 62.3µs align 32768 pre 732µs on 792µs post 743µs diff 54.1µs align 16384 pre 685µs on 808µs post 767µs diff 82.6µs align 8192 pre 732µs on 764µs post 697µs diff 49.8µs align 4096 pre 661µs on 692µs post 681µs diff 20.7µs align 2048 pre 671µs on 657µs post 653µs diff -5465ns
Are these results reproducible? It's not at all clear to me that the erase size is really 4 MB, it could also be 1 MB for instance, especially if your stick is from before 2010. You can rerun the command with --count=100 or more, or with larger block sizes to get a better feeling.
Another helpful indication would be the output of 'fdisk -lu /dev/sde': It will show the start of the partition and the size of the drive, both should be a multiple of the erase block size.
Finally, a third way is to look at a gnuplot chart on the output of
flashbench -s -o output.plot /dev/sde --scatter-order=10 --scatter-span=2 --blocksize=8192 gnuplot -p -e 'plot "output.plot"'
On many drives, the boundaries between erase blocks show up as spikes in the chart.
Also, please post the USB ID and name output from 'lsusb' for reference.
# ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=2 sched_setscheduler: Operation not permitted 4MiB 6.69M/s 2MiB 11.1M/s 1MiB 13.2M/s 512KiB 14.4M/s 256KiB 14.6M/s # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=3 sched_setscheduler: Operation not permitted 4MiB 6.68M/s 2MiB 11.2M/s 1MiB 12.9M/s 512KiB 14.5M/s 256KiB 14.8M/s # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=4 sched_setscheduler: Operation not permitted 4MiB 6.8M/s 2MiB 10.9M/s 1MiB 13M/s 512KiB 14.4M/s 256KiB 14.6M/s # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=6 sched_setscheduler: Operation not permitted 4MiB 7.45M/s 2MiB 9.24M/s 1MiB 16.4M/s 512KiB 17.4M/s 256KiB 7.98M/s
Yes, this is rather inconclusive so far. I would recommend use a smaller blocksize value, to get more rows for each measurement. You can also try much larger values of --open-au-nr, the largest one that was reported is 20, and you can try with the --random flag to see if the behavior changes at all.
Thanks for the report!
Arnd
flashbench-results@lists.linaro.org