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
Dne Út 4. září 2012 06:46:06 jste napsal(a):
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.
# No more than 3 erase blocks with 8 MB size:
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=4 8MiB 4.4M/s 4MiB 1.83M/s 2MiB 2.42M/s 1MiB 2.75M/s 512KiB 2.38M/s 256KiB 2.37M/s 128KiB 2.34M/s 64KiB 2.29M/s 32KiB 2.14M/s 16KiB 1.91M/s 8KiB 1.31M/s
#Now with --random:
$ sudo flashbench /dev/sdb --open-au --erasesize=$[16*1024*1024] -- blocksize=$[16*1024] --open-au-nr=1 --random Password: 16MiB 7.84M/s 8MiB 17.8M/s 4MiB 8.64M/s 2MiB 7.82M/s 1MiB 18.1M/s 512KiB 8.25M/s 256KiB 8.07M/s 128KiB 7.58M/s 64KiB 13.8M/s 32KiB 6.12M/s 16KiB 4.51M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[16*1024*1024] -- blocksize=$[16*1024] --open-au-nr=3 --random 16MiB 7.76M/s 8MiB 18M/s 4MiB 7.88M/s 2MiB 13.1M/s 1MiB 9.48M/s 512KiB 9.69M/s 256KiB 8.97M/s 128KiB 9.1M/s 64KiB 7.96M/s 32KiB 6.59M/s 16KiB 4.77M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[16*1024*1024] -- blocksize=$[16*1024] --open-au-nr=4 --random 16MiB 6.66M/s 8MiB 3.82M/s 4MiB 4.93M/s 2MiB 3.22M/s 1MiB 2.14M/s 512KiB 1.28M/s 256KiB 853K/s 128KiB 519K/s 64KiB 246K/s
# Quite shaky speeds, but again, no more than 3 open AUs with 16 MB erase blocks
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=1 --random 8MiB 18.2M/s 4MiB 17.9M/s 2MiB 17.7M/s 1MiB 17.6M/s 512KiB 17.3M/s 256KiB 15.9M/s 128KiB 15.6M/s 64KiB 13.2M/s 32KiB 10M/s 16KiB 6.41M/s 8KiB 1.71M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=3 --random Password: 8MiB 4.71M/s 4MiB 19M/s 2MiB 18.2M/s 1MiB 17.1M/s 512KiB 16.8M/s 256KiB 15.7M/s 128KiB 14.6M/s 64KiB 13.1M/s 32KiB 9.4M/s 16KiB 6.13M/s 8KiB 1.62M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=4 --random Password: 8MiB 2.28M/s 4MiB 2.14M/s 2MiB 2.42M/s 1MiB 1.6M/s 512KiB 1.1M/s 256KiB 651K/s ^C
# With 8 MB erase blocks the numbers are much more stable, but still max 3 open AUs. Does this indicate something? Anyway, thanks for your time!
On Wednesday 05 September 2012, Jaroslav Martínek wrote:
Dne Út 4. září 2012 06:46:06 jste napsal(a):
On Monday 03 September 2012, Jaroslav Martínek wrote:
# Quite shaky speeds, but again, no more than 3 open AUs with 16 MB erase blocks
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=1 --random 8MiB 18.2M/s 4MiB 17.9M/s 2MiB 17.7M/s 1MiB 17.6M/s 512KiB 17.3M/s 256KiB 15.9M/s 128KiB 15.6M/s 64KiB 13.2M/s 32KiB 10M/s 16KiB 6.41M/s 8KiB 1.71M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=3 --random Password: 8MiB 4.71M/s 4MiB 19M/s 2MiB 18.2M/s 1MiB 17.1M/s 512KiB 16.8M/s 256KiB 15.7M/s 128KiB 14.6M/s 64KiB 13.1M/s 32KiB 9.4M/s 16KiB 6.13M/s 8KiB 1.62M/s
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=4 --random Password: 8MiB 2.28M/s 4MiB 2.14M/s 2MiB 2.42M/s 1MiB 1.6M/s 512KiB 1.1M/s 256KiB 651K/s ^C
# With 8 MB erase blocks the numbers are much more stable, but still max 3 open AUs. Does this indicate something? Anyway, thanks for your time!
Yes, this is a clear indication that the device has at most 8 MB erase blocks, not 16 MB. And that's good!
It's also clear that it can do random access inside of each erase block.
To explain what happens here, doing random access over three 16 MB sections on a device that has 8 MB erase blocks in reality means that the device actually uses six 8 MB erase blocks, which it cannot handle.
It is still possible that the actual erase block size is smaller than 8 MB (in which case you would find that it can handle more than 3 blocks), or that the erase blocks are 12 MB.
If you like to find out for sure, you can run
# this is slow for 8 MB erase blocks but fast for 12 MB erase blocks sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] --blocksize=$[8*1024] --open-au-nr=3 --random
# this is slow for 8 MB erase blocks but fast for 4 MB or 6 MB erase blocks sudo flashbench /dev/sdb --open-au --erasesize=$[4*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random
# if the previous one was fast, this will be fast for 6 MB erase blocks but slow for 4 MB sudo flashbench /dev/sdb --open-au --erasesize=$[6*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random
If you come to a result with the above, please also send the output of 'lsusb' so I have all the information to add to the wiki page.
Arnd
Dne Čt 6. září 2012 13:50:19 jste napsal(a):
Yes, this is a clear indication that the device has at most 8 MB erase blocks, not 16 MB. And that's good!
It's also clear that it can do random access inside of each erase block.
To explain what happens here, doing random access over three 16 MB sections on a device that has 8 MB erase blocks in reality means that the device actually uses six 8 MB erase blocks, which it cannot handle.
It is still possible that the actual erase block size is smaller than 8 MB (in which case you would find that it can handle more than 3 blocks), or that the erase blocks are 12 MB.
If you like to find out for sure, you can run
# this is slow for 8 MB erase blocks but fast for 12 MB erase blocks sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] --blocksize=$[8*1024] --open-au-nr=3 --random
Sorry for a bit late answer, I was quite busy last days. Anyway, here are the results:
$ sudo flashbench /dev/sdb --open-au --erasesize=$[8*1024*1024] -- blocksize=$[8*1024] --open-au-nr=3 --random 8MiB 1.95M/s 4MiB 18.3M/s 2MiB 17.4M/s 1MiB 17.4M/s 512KiB 17M/s 256KiB 15.7M/s 128KiB 14.5M/s 64KiB 14.1M/s 32KiB 9.37M/s 16KiB 6.18M/s 8KiB 1.63M/s
# This one is fast, suggesting 8MB erase blocks?
# this is slow for 8 MB erase blocks but fast for 4 MB or 6 MB erase blocks sudo flashbench /dev/sdb --open-au --erasesize=$[4*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random
$ sudo flashbench /dev/sdb --open-au --erasesize=$[4*1024*1024] -- blocksize=$[8*1024] --open-au-nr=6 --random 4MiB 1.09M/s 2MiB 690K/s 1MiB 387K/s 512KiB 212K/s ^C
# This one is really slow, so it's confirming 8 MB erase blocks?
# if the previous one was fast, this will be fast for 6 MB erase blocks but slow for 4 MB sudo flashbench /dev/sdb --open-au --erasesize=$[6*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random
$ sudo flashbench /dev/sdb --open-au --erasesize=$[6*1024*1024] -- blocksize=$[6*1024] --open-au-nr=6 --random 6MiB 2.18M/s 3MiB 1.32M/s 1.5MiB 660K/s 768KiB 332K/s 384KiB 169K/s
# Here it's also slow, but that was expected.
If you come to a result with the above, please also send the output of 'lsusb' so I have all the information to add to the wiki page.
Here's the relevant lsusb line:
ID 125f:311a A-DATA Technology Co., Ltd.
JM
On Thursday 06 September 2012 09:50:19 Arnd Bergmann wrote:
# this is slow for 8 MB erase blocks but fast for 4 MB or 6 MB erase blocks sudo flashbench /dev/sdb --open-au --erasesize=$[4*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random
I'm conufsed, why would this be slow for 8 MiB erase blocks?
If the device's erase block size was 8 MiB, wouldn't this still only ever have 3 open?
Thanks, Andrew
On Monday 10 September 2012, Andrew Bradford wrote:
On Thursday 06 September 2012 09:50:19 Arnd Bergmann wrote:
# this is slow for 8 MB erase blocks but fast for 4 MB or 6 MB erase blocks sudo flashbench /dev/sdb --open-au --erasesize=$[4*1024*1024] --blocksize=$[8*1024] --open-au-nr=6 --random
I'm conufsed, why would this be slow for 8 MiB erase blocks?
If the device's erase block size was 8 MiB, wouldn't this still only ever have 3 open?
It uses six blocks of 4MB, which are 24 MB apart in logical addresses, so each of them is in a different 8 MB block.
Arnd
flashbench-results@lists.linaro.org