On Monday 03 September 2012, Jaroslav MartĂnek wrote:
Okay, so I did some further tests:
$ sudo flashbench /dev/sdb --open-au --erasesize=$[16*1024*1024] -- blocksize=$[16*1024] --open-au-nr=1 Password: 16MiB 5.2M/s 8MiB 18M/s 4MiB 18M/s 2MiB 17.3M/s 1MiB 17.4M/s 512KiB 16.9M/s 256KiB 15.9M/s 128KiB 15.1M/s 64KiB 13.4M/s 32KiB 9.98M/s 16KiB 6.46M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[16*1024*1024] -- blocksize=$[16*1024] --open-au-nr=3 16MiB 8.13M/s 8MiB 17.9M/s 4MiB 17.3M/s 2MiB 17.5M/s 1MiB 17.3M/s 512KiB 17M/s 256KiB 15.7M/s 128KiB 14.7M/s 64KiB 13.1M/s 32KiB 9.64M/s 16KiB 6.13M/s
# So far good...
$ sudo flashbench /dev/sdb --open-au --erasesize=$[16*1024*1024] -- blocksize=$[16*1024] --open-au-nr=4 16MiB 8.16M/s 8MiB 3.76M/s 4MiB 4.92M/s 2MiB 5.25M/s 1MiB 4.8M/s 512KiB 4.76M/s 256KiB 4.67M/s 128KiB 4.59M/s 64KiB 4.38M/s 32KiB 3.9M/s 16KiB 3.17M/s
# Here it gets much worse, so I would assume, that thist drive can handle 3 open AUs if the 16 MB erase size is correct? Also note that on the biggest size (16 MB) it's slow, but only for the first run, why's that? If repeated, it stays on full speed until I change erase size:
What makes one run slow is the garbage collection that happens because of the state the drive is already in. Writing in small units can cause this state.
# Now with 8 MB: $ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=3 8MiB 4.64M/s 4MiB 18.2M/s 2MiB 17.6M/s 1MiB 17.7M/s 512KiB 16.8M/s 256KiB 15.8M/s 128KiB 15.2M/s 64KiB 13M/s 32KiB 9.46M/s 16KiB 6.14M/s 8KiB 2.51M/s
# Seems to be similar to 16 MB
Well, the question is whether using an 8MB size is also fast with more than 3 erase blocks. If it can have 6*8MB, that would imply only 3*16MB in the first run. It may be easier to spot the difference between the two when you pass '--random', but some drives don't like that at all.
$ sudo flashbench /dev/sdb --open-au --erasesize=$[12*1024*1024] -- blocksize=$[6*1024] --open-au-nr=3 12MiB 2.88M/s 6MiB 3.79M/s 3MiB 4.65M/s 1.5MiB 6.28M/s 768KiB 6.22M/s 384KiB 6.16M/s 192KiB 6.11M/s 96KiB 5.96M/s 48KiB 5.32M/s 24KiB 3.73M/s 12KiB 1.95M/s 6KiB 1.05M/s
# 12 MB definetely ruled out
right.
So, it seems to have 16 MB erase blocks? But then, I'm not able to count any reasonable block size from these numbers:
$ sudo fdisk -l /dev/sdb Disk /dev/sdb: 31,2 GB, 31 161 974 784 bytes
$ factor 31161974784 31161974784: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 19 43 97
$ echo $[31161974784 / 1024 / 97 / 43] 7296
# 7,125 MB? Weird number...
$ echo $[31161974784 / 1024 / 97 / 43 / 19] 384
$ echo $[31161974784 / 1024 / 97 / 43 / 19 / 3] 128
# Finally some "round" number, but too small for a 32 GB drive
So, I thought I could be able to count block size from whole drive size, like there has to be some number of blocks with same size, which together gives the full disk size. Or am I still missing something? I did those tests on another smaller flash drive and the results was pretty obvious with regard of what i figured out from this list and readme. But this 32 GB drive is still a bit cryptic to me.
Yes, some drives are like this
By the way, are you interested of the results from the other USB drives and SD cards I have around here?
Yes, if you have them, then please send them to the mailing list.
Arnd