Tests for Sandisk 32G usb flash drive.
$ lsusb Bus 002 Device 003: ID 0781:5530 SanDisk Corp. Cruzer
$ fdisk -l /dev/sdc
Disk /dev/sdc: 32.0 GB, 32015679488 bytes 255 têtes, 63 secteurs/piste, 3892 cylindres, total 62530624 secteurs Unités = secteurs de 1 * 512 = 512 octets Taille de secteur (logique / physique) : 512 octets / 512 octets taille d'E/S (minimale / optimale) : 512 octets / 512 octets Identifiant de disque : 0x00000000
Périphérique Amorce Début Fin Blocs Id Système /dev/sdc1 * 32 62530623 31265296 c W95 FAT32 (LBA)
$ ./flashbench -a /dev/sdc --blocksize=1024 align 8589934592 pre 931µs on 1.44ms post 811µs diff 565µs align 4294967296 pre 894µs on 1.58ms post 770µs diff 750µs align 2147483648 pre 878µs on 1.59ms post 791µs diff 756µs align 1073741824 pre 946µs on 1.75ms post 896µs diff 825µs align 536870912 pre 942µs on 1.69ms post 909µs diff 766µs align 268435456 pre 901µs on 1.58ms post 851µs diff 708µs align 134217728 pre 937µs on 1.65ms post 882µs diff 741µs align 67108864 pre 902µs on 1.63ms post 842µs diff 760µs align 33554432 pre 898µs on 1.62ms post 842µs diff 751µs align 16777216 pre 878µs on 1.63ms post 911µs diff 737µs align 8388608 pre 884µs on 1.62ms post 890µs diff 734µs align 4194304 pre 858µs on 1.42ms post 786µs diff 597µs align 2097152 pre 869µs on 923µs post 882µs diff 47.6µs align 1048576 pre 879µs on 917µs post 866µs diff 45µs align 524288 pre 844µs on 881µs post 844µs diff 37µs align 262144 pre 842µs on 890µs post 846µs diff 45.9µs align 131072 pre 839µs on 884µs post 846µs diff 41.6µs align 65536 pre 846µs on 880µs post 829µs diff 42.6µs align 32768 pre 841µs on 897µs post 841µs diff 55.7µs align 16384 pre 842µs on 878µs post 884µs diff 14.7µs align 8192 pre 843µs on 854µs post 844µs diff 10µs align 4096 pre 846µs on 848µs post 845µs diff 2.42µs align 2048 pre 845µs on 846µs post 846µs diff 658ns
$ ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256* 1024] /dev/sdc --open-au-nr=7 4MiB 23M/s 2MiB 22.8M/s 1MiB 22.8M/s 512KiB 22.5M/s 256KiB 21.5M/s
$ ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256* 1024] /dev/sdc --open-au-nr=8 4MiB 15.2M/s 2MiB 22.8M/s 1MiB 22.7M/s 512KiB 22.4M/s 256KiB 21.5M/s
$ ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256* 1024] /dev/sdc --open-au-nr=9 4MiB 23M/s 2MiB 22.8M/s 1MiB 22.7M/s 512KiB 22.5M/s 256KiB 21.4M/s
$ ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256* 1024] /dev/sdc --open-au-nr=10 4MiB 10.4M/s 2MiB 6.93M/s 1MiB 5.95M/s 512KiB 6.06M/s 256KiB 5.81M/s
$ ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256* 1024] /dev/sdc --random --open-au-nr=9 4MiB 23M/s 2MiB 22.8M/s 1MiB 22.7M/s 512KiB 21.3M/s 256KiB 10.5M/s
$ ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256* 1024] /dev/sdc --random --open-au-nr=10 4MiB 9.56M/s 2MiB 6.94M/s 1MiB 3.92M/s 512KiB 3.82M/s 256KiB 2.23M/s
$ ./flashbench -f /dev/sdc --erasesize=$[4* 1024 * 1024] --blocksize=512 --random 4MiB 22.9M/s 23.1M/s 22.9M/s 23.1M/s 23.2M/s 23.2M/s 2MiB 23.2M/s 23.1M/s 23.1M/s 23.1M/s 23.1M/s 23M/s 1MiB 23M/s 23M/s 23M/s 23M/s 23M/s 22.9M/s 512KiB 21.5M/s 21.5M/s 21.6M/s 21.6M/s 21.5M/s 21.4M/s 256KiB 10.6M/s 10.7M/s 10.6M/s 10.6M/s 10.6M/s 10.6M/s 128KiB 2.89M/s 2.9M/s 2.85M/s 2.89M/s 2.9M/s 2.89M/s 64KiB 1.2M/s 1.21M/s 1.2M/s 1.2M/s 1.2M/s 1.2M/s 32KiB 601K/s 604K/s 603K/s 601K/s 604K/s 601K/s 16KiB 305K/s 306K/s 305K/s 304K/s 305K/s 304K/s 8KiB 1.62M/s 1.65M/s 1.64M/s 1.65M/s 1.64M/s 1.65M/s 4KiB 1.45M/s 1.46M/s 1.46M/s 1.45M/s 1.44M/s 1.43M/s 2KiB 729K/s 729K/s 722K/s 733K/s 732K/s 726K/s 1KiB 366K/s 365K/s 366K/s 364K/s 365K/s 362K/s 512B 172K/s 172K/s 171K/s 172K/s 171K/s 169K/s
# For completeness sake
$ ./flashbench -f /dev/sdc --erasesize=$[1024 * 1024] --blocksize=512 --random 1MiB 21M/s 22M/s 21.8M/s 23.2M/s 22M/s 21.9M/s 512KiB 20.7M/s 20.2M/s 15.2M/s 21.3M/s 21.2M/s 19.8M/s 256KiB 6.49M/s 7.91M/s 10.2M/s 6.66M/s 6.51M/s 18M/s 128KiB 3.36M/s 2.46M/s 4.96M/s 3.59M/s 3.37M/s 3.37M/s 64KiB 1.06M/s 1.45M/s 971K/s 1.15M/s 1.05M/s 1.39M/s 32KiB 633K/s 732K/s 566K/s 671K/s 633K/s 668K/s 16KiB 343K/s 327K/s 346K/s 339K/s 345K/s 341K/s 8KiB 1.05M/s 1.25M/s 1.18M/s 1.21M/s 985K/s 1.47M/s 4KiB 1.51M/s 1.56M/s 1.25M/s 1.55M/s 1.47M/s 1.35M/s 2KiB 816K/s 788K/s 793K/s 720K/s 809K/s 809K/s 1KiB 360K/s 390K/s 391K/s 363K/s 358K/s 388K/s 512B 172K/s 180K/s 172K/s 179K/s 172K/s 180K/s
So my guess is erase block size = 4Mo, the page size seems to be 4K. Am I missing something? Are further test needed to characterize the USB stick?
I plan to put an ext4 and a VFAT partition on this usb stick. Do I need to take steps further than ensuring an alignment of 4M boundaries to ensure proper use (e.g., adapt pagesize or cluster size of the filesystems)?
Also, I wonder why -f tests show such poor performance for 32Kib and 16Kib and 8Kib compared to 4Kib.
Best wishes, Jean-René Reinhard
flashbench-results@lists.linaro.org