Just bought a new stick, is USB 3.0 capable, I only got a USB 2.0 slot for testing, these are the results:
(kernel 2.6.38.6)
# lsusb -v Bus 001 Device 005: ID 1b1c:1a00 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1b1c idProduct 0x1a00 bcdDevice a.00 iManufacturer 1 Corsair iProduct 2 Voyager 3.0 iSerial 3 09021000000000000000001038 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Status: 0x0000
# ./flashbench -a /dev/sdd --blocksize=1024 align 4294967296 pre 868µs on 1.16ms post 866µs diff 290µs align 2147483648 pre 870µs on 1.28ms post 864µs diff 413µs align 1073741824 pre 865µs on 1.12ms post 864µs diff 252µs align 536870912 pre 855µs on 1.11ms post 866µs diff 253µs align 268435456 pre 863µs on 999µs post 854µs diff 140µs align 134217728 pre 866µs on 1.1ms post 863µs diff 233µs align 67108864 pre 858µs on 1.11ms post 865µs diff 254µs align 33554432 pre 866µs on 996µs post 867µs diff 129µs align 16777216 pre 868µs on 1.12ms post 867µs diff 252µs align 8388608 pre 867µs on 1.12ms post 865µs diff 253µs align 4194304 pre 819µs on 872µs post 865µs diff 29.9µs align 2097152 pre 837µs on 872µs post 862µs diff 23µs align 1048576 pre 852µs on 871µs post 870µs diff 9.95µs align 524288 pre 857µs on 870µs post 859µs diff 12.2µs align 262144 pre 842µs on 870µs post 866µs diff 15.7µs align 131072 pre 848µs on 867µs post 870µs diff 7.85µs align 65536 pre 852µs on 870µs post 859µs diff 14.6µs align 32768 pre 864µs on 866µs post 865µs diff 1.15µs align 16384 pre 861µs on 870µs post 867µs diff 5.94µs align 8192 pre 860µs on 989µs post 864µs diff 127µs align 4096 pre 868µs on 968µs post 865µs diff 101µs align 2048 pre 865µs on 869µs post 860µs diff 6.97µs
# ./flashbench -a /dev/sdd --blocksize=$[256 * 1024] align 4294967296 pre 7.83ms on 8.15ms post 7.73ms diff 373µs align 2147483648 pre 7.84ms on 8.19ms post 7.77ms diff 388µs align 1073741824 pre 7.68ms on 7.87ms post 7.67ms diff 194µs align 536870912 pre 7.72ms on 7.97ms post 7.66ms diff 277µs align 268435456 pre 7.74ms on 7.95ms post 7.68ms diff 240µs align 134217728 pre 7.78ms on 7.99ms post 7.69ms diff 256µs align 67108864 pre 7.81ms on 7.99ms post 7.74ms diff 211µs align 33554432 pre 7.79ms on 7.99ms post 7.64ms diff 271µs align 16777216 pre 7.82ms on 7.98ms post 7.69ms diff 227µs align 8388608 pre 7.78ms on 7.99ms post 7.66ms diff 274µs align 4194304 pre 7.78ms on 7.75ms post 7.76ms diff -22205n align 2097152 pre 7.84ms on 7.84ms post 7.87ms diff -10279n align 1048576 pre 7.76ms on 7.76ms post 7.74ms diff 10.1µs align 524288 pre 7.75ms on 7.76ms post 7.76ms diff 3.1µs
# ./flashbench -a /dev/sdd --blocksize=$[512 * 1024] align 4294967296 pre 14.7ms on 15ms post 14.7ms diff 268µs align 2147483648 pre 14.4ms on 14.8ms post 14.4ms diff 417µs align 1073741824 pre 14.5ms on 14.7ms post 14.4ms diff 235µs align 536870912 pre 14.4ms on 14.6ms post 14.4ms diff 229µs align 268435456 pre 14.5ms on 14.8ms post 14.4ms diff 371µs align 134217728 pre 14.5ms on 14.7ms post 14.5ms diff 186µs align 67108864 pre 14.5ms on 14.7ms post 14.5ms diff 247µs align 33554432 pre 14.5ms on 14.7ms post 14.5ms diff 199µs align 16777216 pre 14.5ms on 14.6ms post 14.4ms diff 140µs align 8388608 pre 14.5ms on 14.7ms post 14.5ms diff 221µs align 4194304 pre 14.5ms on 14.5ms post 14.5ms diff -25738n align 2097152 pre 14.6ms on 14.6ms post 14.5ms diff 12.9µs align 1048576 pre 14.6ms on 14.6ms post 14.5ms diff 30.9µs
# ./flashbench -a /dev/sdd --blocksize=$[1024 * 1024] align 4294967296 pre 27.9ms on 28.5ms post 28.4ms diff 340µs align 2147483648 pre 28.1ms on 28.4ms post 28.1ms diff 295µs align 1073741824 pre 28ms on 28.3ms post 28ms diff 244µs align 536870912 pre 28.1ms on 28.3ms post 28.2ms diff 199µs align 268435456 pre 28.4ms on 28.5ms post 28.2ms diff 233µs align 134217728 pre 28.3ms on 28.3ms post 27.9ms diff 228µs align 67108864 pre 28.1ms on 28.4ms post 28.1ms diff 289µs align 33554432 pre 28.2ms on 28.4ms post 28ms diff 240µs align 16777216 pre 28.2ms on 28.4ms post 28.1ms diff 232µs align 8388608 pre 28.1ms on 28.3ms post 28.1ms diff 264µs align 4194304 pre 28ms on 28.2ms post 28.2ms diff 159µs align 2097152 pre 28ms on 28ms post 28.1ms diff -10985n
# ./flashbench --open-au --open-au-nr=2 --erasesize=$[4 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 4MiB 22M/s 2MiB 5.91M/s 1MiB 21.5M/s 512KiB 5.88M/s 256KiB 20.9M/s
# ./flashbench --open-au --open-au-nr=2 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.3M/s 4MiB 21.1M/s 2MiB 21M/s 1MiB 20.9M/s 512KiB 20.7M/s 256KiB 20.2M/s
# ./flashbench --open-au --open-au-nr=4 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.3M/s 4MiB 21.1M/s 2MiB 21.1M/s 1MiB 20.9M/s 512KiB 20.7M/s 256KiB 20.2M/s
# ./flashbench --open-au --open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.2M/s 4MiB 16.7M/s 2MiB 15.2M/s 1MiB 14.5M/s 512KiB 14.1M/s 256KiB 13.7M/s
# ./flashbench --open-au --open-au-nr=6 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.3M/s 4MiB 14.8M/s 2MiB 12.8M/s 1MiB 12M/s 512KiB 11.6M/s 256KiB 11.2M/s
# ./flashbench --open-au --open-au-nr=2 --erasesize=$[16 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 16MiB 21.5M/s 8MiB 21.3M/s 4MiB 21.3M/s 2MiB 21.2M/s 1MiB 21.1M/s 512KiB 20.8M/s 256KiB 20.3M/s
# ./flashbench --open-au --open-au-nr=3 --erasesize=$[16 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 16MiB 21.5M/s 8MiB 21.3M/s 4MiB 21.2M/s 2MiB 21.1M/s 1MiB 21.2M/s 512KiB 21.2M/s 256KiB 20.6M/s
# ./flashbench --open-au --open-au-nr=4 --erasesize=$[16 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 16MiB 21.7M/s 8MiB 21.5M/s 4MiB 21.5M/s 2MiB 21.3M/s 1MiB 21.2M/s 512KiB 21M/s 256KiB 20.4M/s
# ./flashbench --open-au --open-au-nr=5 --erasesize=$[16 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 16MiB 21.4M/s 8MiB 21.3M/s 4MiB 16.9M/s 2MiB 15.3M/s 1MiB 14.6M/s 512KiB 14.1M/s 256KiB 13.7M/s
# ./flashbench --open-au --open-au-nr=6 --erasesize=$[16 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 16MiB 21.3M/s 8MiB 21.2M/s 4MiB 14.8M/s 2MiB 12.8M/s 1MiB 12M/s 512KiB 9.32M/s 256KiB 11.2M/s
# ./flashbench --open-au --open-au-nr=4 --erasesize=$[8 * 1024 * 1024] /dev/sdd --random 8MiB 21.2M/s 4MiB 21.4M/s 2MiB 12.8M/s 1MiB 8.06M/s 512KiB 6.77M/s 256KiB 6.01M/s 128KiB 5.92M/s 64KiB 5.58M/s 32KiB 3.15M/s 16KiB 2.64M/s
# ./flashbench --open-au --open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --random 8MiB 21.3M/s 4MiB 17M/s 2MiB 11.1M/s 1MiB 7.7M/s 512KiB 5.67M/s 256KiB 6.19M/s 128KiB 5.13M/s 64KiB 5.69M/s 32KiB 3.19M/s 16KiB 2.2M/s
Can you guide me with what I should test next?
On Tuesday 31 May 2011, Michael Monnerie wrote:
# ./flashbench --open-au --open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --random 8MiB 21.3M/s 4MiB 17M/s 2MiB 11.1M/s 1MiB 7.7M/s 512KiB 5.67M/s 256KiB 6.19M/s 128KiB 5.13M/s 64KiB 5.69M/s 32KiB 3.19M/s 16KiB 2.2M/s
Can you guide me with what I should test next?
Try larger values for --open-au-nr=X. You are on the right track, the erasesize is obviously 8 MB, and the number of open AUs is most likely more than 6.
For both linear and --random, you can pass --open-au-nr=32 just for fun, to see what happens (the performance should be horrible, no need to let it run to the end in that case), then start with smaller values (8, 12, 16, 20) to see where the cutoff is. Find the largest fast one and the smallest slow one for linear and random modes.
With the --open-au tests, just use --blocksize=512 as a start. The number only defines when the test stops.
Arnd
On Dienstag, 31. Mai 2011 Arnd Bergmann wrote:
Try larger values for --open-au-nr=X. You are on the right track, the erasesize is obviously 8 MB, and the number of open AUs is most likely more than 6.
For both linear and --random, you can pass --open-au-nr=32 just for fun, to see what happens (the performance should be horrible, no need to let it run to the end in that case), then start with smaller values (8, 12, 16, 20) to see where the cutoff is. Find the largest fast one and the smallest slow one for linear and random modes.
With the --open-au tests, just use --blocksize=512 as a start. The number only defines when the test stops.
I thought that already with "--open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --random" it was slow. What is your definition of slow? For me, the first test that goes below 20MB/s would have been slow, so "--open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024]" But you seem to mean something else.
Here some results.
# ./flashbench --open-au --open-au-nr=7 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.5M/s 4MiB 13.8M/s 2MiB 11.6M/s 1MiB 10.8M/s 512KiB 10.4M/s 256KiB 10M/s
# ./flashbench --open-au --open-au-nr=8 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.4M/s 4MiB 13M/s 2MiB 10.8M/s 1MiB 9.93M/s 512KiB 9.49M/s 256KiB 7.17M/s
# ./flashbench --open-au --open-au-nr=10 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.3M/s 4MiB 11.9M/s 2MiB 9.75M/s 1MiB 8.03M/s 512KiB 5.6M/s 256KiB 5.14M/s
# ./flashbench --open-au --open-au-nr=12 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024] 8MiB 21.2M/s 4MiB 11.4M/s 2MiB 9.2M/s 1MiB 4.98M/s 512KiB 4.84M/s 256KiB 7.79M/s
Results with small Blocksize. Run by a script which outputs the start time of the test, so you can see how long it was running. Unforunately, I only saw that I used "8*512*1024" for the erasesize, which is 4MB instead of the wanted 8MB. Does that matter?
@12:03:52 # ./flashbench --open-au --open-au-nr=1 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 22M/s 2MiB 5.99M/s 1MiB 21.2M/s 512KiB 5.98M/s 256KiB 20.9M/s 128KiB 5.92M/s 64KiB 21.2M/s 32KiB 5.99M/s 16KiB 18.3M/s 8KiB 4.79M/s 4KiB 6.97M/s 2KiB 3.96M/s 1KiB 2.03M/s 512B 1.03M/s @12:04:05 # ./flashbench --open-au --open-au-nr=2 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 21.9M/s 2MiB 5.91M/s 1MiB 21.7M/s 512KiB 5.87M/s 256KiB 20.9M/s 128KiB 5.71M/s 64KiB 18.2M/s 32KiB 5.13M/s 16KiB 9.5M/s 8KiB 2.04M/s 4KiB 863K/s 2KiB 502K/s 1KiB 244K/s 512B 125K/s @12:06:26 # ./flashbench --open-au --open-au-nr=3 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 8.22M/s 2MiB 5.84M/s 1MiB 21.6M/s 512KiB 5.84M/s 256KiB 20.8M/s 128KiB 5.68M/s 64KiB 18.2M/s 32KiB 5.09M/s 16KiB 9.5M/s 8KiB 1.61M/s 4KiB 636K/s 2KiB 359K/s 1KiB 188K/s 512B 91.5K/s @12:11:07 # ./flashbench --open-au --open-au-nr=4 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 13.1M/s 2MiB 7.14M/s 1MiB 9.19M/s 512KiB 9.13M/s 256KiB 9.03M/s 128KiB 8.79M/s 64KiB 8.37M/s 32KiB 7.62M/s 16KiB 3.17M/s 8KiB 1.08M/s 4KiB 620K/s 2KiB 301K/s 1KiB 151K/s 512B 76K/s @12:18:38 # ./flashbench --open-au --open-au-nr=5 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 10.5M/s 2MiB 8.24M/s 1MiB 5.8M/s 512KiB 7.85M/s 256KiB 8.09M/s 128KiB 6.26M/s 64KiB 6.02M/s 32KiB 8.47M/s 16KiB 3.34M/s 8KiB 1.04M/s 4KiB 481K/s 2KiB 246K/s 1KiB 123K/s 512B 62.1K/s @12:30:05 # ./flashbench --open-au --open-au-nr=6 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 9.32M/s 2MiB 7.18M/s 1MiB 5.57M/s 512KiB 4.93M/s 256KiB 5.94M/s 128KiB 6.55M/s 64KiB 5.05M/s 32KiB 2.11M/s 16KiB 2.74M/s 8KiB 887K/s 4KiB 421K/s 2KiB 204K/s 1KiB 102K/s 512B 51.7K/s @12:46:41 # ./flashbench --open-au --open-au-nr=8 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 8.12M/s 2MiB 6.15M/s 1MiB 5.36M/s 512KiB 4.35M/s 256KiB 3.95M/s 128KiB 2.97M/s 64KiB 4.2M/s 32KiB 3M/s 16KiB 1.99M/s 8KiB 649K/s 4KiB 326K/s 2KiB 167K/s 1KiB 83.9K/s 512B 42K/s @13:13:55 # ./flashbench --open-au --open-au-nr=10 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 7.57M/s 2MiB 5.69M/s 1MiB 5.24M/s 512KiB 5.03M/s 256KiB 3.12M/s 128KiB 4.31M/s 64KiB 4.43M/s 32KiB 2.04M/s 16KiB 1.3M/s 8KiB 553K/s 4KiB 265K/s 2KiB 131K/s 1KiB 65.4K/s 512B 33K/s @13:56:57 # ./flashbench --open-au --open-au-nr=12 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 7.37M/s 2MiB 5.52M/s 1MiB 4.64M/s 512KiB 4.33M/s 256KiB 2.33M/s 128KiB 3.76M/s 64KiB 2.02M/s 32KiB 1.63M/s 16KiB 892K/s 8KiB 433K/s 4KiB 156K/s 2KiB 69.7K/s 1KiB 44.5K/s 512B 19.6K/s @15:21:05 # ./flashbench --open-au --open-au-nr=16 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 6.9M/s 2MiB 5.14M/s 1MiB 4.65M/s 512KiB 1.63M/s 256KiB 4.06M/s 128KiB 1.73M/s 64KiB 1.64M/s 32KiB 1.02M/s 16KiB 471K/s 8KiB 238K/s 4KiB 111K/s 2KiB 57.4K/s 1KiB 28.6K/s 512B 14.4K/s @17:58:45 # ./flashbench --open-au --open-au-nr=20 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 4.54M/s 2MiB 4.98M/s 1MiB 1.21M/s 512KiB 947K/s 256KiB 491K/s 128KiB 285K/s 64KiB 109K/s 32KiB 73.6K/s 16KiB 29.9K/s 8KiB 13.5K/s 4KiB 6.77K/s 2KiB 3.4K/s Terminated (was running from 1800 overnight until 1042, so I killed it) @10:42:10 # ./flashbench --open-au --open-au-nr=24 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 5.96M/s 2MiB 3.83M/s 1MiB 1.13M/s 512KiB 614K/s Terminated @10:50:35 # ./flashbench --open-au --open-au-nr=32 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 5.53M/s 2MiB 3.41M/s 1MiB 1.11M/s Terminated
Now the tests with "--random" and correct 8MB erasesize:
@10:58:54 # ./flashbench --open-au --open-au-nr=1 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 7.11M/s 4MiB 21.9M/s 2MiB 13.2M/s 1MiB 8.37M/s 512KiB 7.02M/s 256KiB 6.48M/s 128KiB 6.15M/s 64KiB 5.86M/s 32KiB 5.45M/s 16KiB 4.1M/s 8KiB 1.75M/s 4KiB 1.22M/s 2KiB 512K/s 1KiB 266K/s 512B 136K/s @11:01:07 # ./flashbench --open-au --open-au-nr=2 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.6M/s 4MiB 13.6M/s 2MiB 9.66M/s 1MiB 7.53M/s 512KiB 6.75M/s 256KiB 6.38M/s 128KiB 6.13M/s 64KiB 5.69M/s 32KiB 5.38M/s 16KiB 3.17M/s 8KiB 1.95M/s 4KiB 894K/s 2KiB 462K/s 1KiB 232K/s 512B 116K/s @11:06:14 # ./flashbench --open-au --open-au-nr=3 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.1M/s 4MiB 9.89M/s 2MiB 6.99M/s 1MiB 5.7M/s 512KiB 5.16M/s 256KiB 4.79M/s 128KiB 4.72M/s 64KiB 4.54M/s 32KiB 3.21M/s 16KiB 2.55M/s 8KiB 1.63M/s 4KiB 693K/s 2KiB 354K/s 1KiB 177K/s 512B 90.2K/s @11:16:09 # ./flashbench --open-au --open-au-nr=4 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22M/s 4MiB 9.25M/s 2MiB 6.69M/s 1MiB 5.59M/s 512KiB 3.5M/s 256KiB 4.91M/s 128KiB 4.77M/s 64KiB 4.57M/s 32KiB 3.08M/s 16KiB 2.27M/s 8KiB 1.37M/s 4KiB 573K/s 2KiB 295K/s 1KiB 150K/s 512B 74.9K/s @11:31:51 # ./flashbench --open-au --open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.4M/s 4MiB 10.9M/s 2MiB 8.28M/s 1MiB 7.07M/s 512KiB 6.42M/s 256KiB 6.32M/s 128KiB 6.02M/s 64KiB 5.86M/s 32KiB 3.54M/s 16KiB 1.93M/s 8KiB 1.07M/s 4KiB 490K/s 2KiB 242K/s 1KiB 124K/s 512B 61.2K/s @11:55:11 # ./flashbench --open-au --open-au-nr=6 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 16.3M/s 4MiB 9.93M/s 2MiB 7M/s 1MiB 3.9M/s 512KiB 5.13M/s 256KiB 3.46M/s 128KiB 4.58M/s 64KiB 2.85M/s 32KiB 2.82M/s 16KiB 1.8M/s 8KiB 944K/s 4KiB 399K/s 2KiB 219K/s 1KiB 103K/s 512B 51.8K/s @12:28:27 # ./flashbench --open-au --open-au-nr=8 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.3M/s 4MiB 11.3M/s 2MiB 8.45M/s 1MiB 6.88M/s 512KiB 4.15M/s 256KiB 6.31M/s 128KiB 5.54M/s 64KiB 3.83M/s 32KiB 2.54M/s 16KiB 1.46M/s 8KiB 714K/s 4KiB 344K/s 2KiB 167K/s 1KiB 86.2K/s 512B 42.4K/s @13:21:57 # ./flashbench --open-au --open-au-nr=10 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22M/s 4MiB 10.8M/s 2MiB 7.43M/s 1MiB 6.82M/s 512KiB 5.23M/s 256KiB 3.92M/s 128KiB 3.85M/s 64KiB 2.6M/s 32KiB 1.64M/s 16KiB 1.17M/s 8KiB 568K/s 4KiB 266K/s 2KiB 136K/s 1KiB 66.1K/s 512B 33.4K/s @14:47:08 # ./flashbench --open-au --open-au-nr=12 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.2M/s 4MiB 10.6M/s 2MiB 4.1M/s 1MiB 4.48M/s 512KiB 3.27M/s 256KiB 2.95M/s 128KiB 3M/s 64KiB 2.04M/s 32KiB 1.15M/s 16KiB 685K/s 8KiB 446K/s 4KiB 193K/s 2KiB 84.5K/s 1KiB 38.6K/s 512B 20.2K/s @17:33:20 # ./flashbench --open-au --open-au-nr=16 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.2M/s 4MiB 10.4M/s 2MiB 3.28M/s 1MiB 3.02M/s 512KiB 2.94M/s 256KiB 2.34M/s 128KiB 2.48M/s 64KiB 1.07M/s 32KiB 911K/s 16KiB 397K/s 8KiB 240K/s 4KiB 115K/s 2KiB 58K/s 1KiB 29K/s 512B 14.5K/s @22:46:38 # ./flashbench --open-au --open-au-nr=20 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.2M/s 4MiB 6.6M/s 2MiB 2.46M/s 1MiB 1.14M/s 512KiB 540K/s 256KiB 362K/s 128KiB 200K/s 64KiB 103K/s 32KiB 52.9K/s 16KiB 27.2K/s 8KiB 13.7K/s Terminated @10:43:54 # ./flashbench --open-au --open-au-nr=24 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 10.2M/s 4MiB 5.3M/s 2MiB 2.28M/s 1MiB 1.1M/s Terminated @10:52:08 # ./flashbench --open-au --open-au-nr=32 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 13.5M/s 4MiB 5.01M/s 2MiB 2.23M/s Terminated
What next?
On Thursday 02 June 2011, Michael Monnerie wrote:
On Dienstag, 31. Mai 2011 Arnd Bergmann wrote:
Try larger values for --open-au-nr=X. You are on the right track, the erasesize is obviously 8 MB, and the number of open AUs is most likely more than 6.
For both linear and --random, you can pass --open-au-nr=32 just for fun, to see what happens (the performance should be horrible, no need to let it run to the end in that case), then start with smaller values (8, 12, 16, 20) to see where the cutoff is. Find the largest fast one and the smallest slow one for linear and random modes.
With the --open-au tests, just use --blocksize=512 as a start. The number only defines when the test stops.
I thought that already with "--open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --random" it was slow. What is your definition of slow? For me, the first test that goes below 20MB/s would have been slow, so "--open-au-nr=5 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=$[256 * 1024]" But you seem to mean something else.
Here some results.
It takes a bit experience to spot the difference, but it's rather clear when you look at the difference between 16 and 20 AUs:
Results with small Blocksize. Run by a script which outputs the start time of the test, so you can see how long it was running. Unforunately, I only saw that I used "8*512*1024" for the erasesize, which is 4MB instead of the wanted 8MB. Does that matter?
Using the wrong erase block size makes the result less clear, but it seems that here you still have the correct output:
@12:03:52 # ./flashbench --open-au --open-au-nr=1 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 22M/s 2MiB 5.99M/s 1MiB 21.2M/s 512KiB 5.98M/s 256KiB 20.9M/s 128KiB 5.92M/s 64KiB 21.2M/s 32KiB 5.99M/s 16KiB 18.3M/s
In particular, what you can see very clearly here is that every other line takes a long time, because the card has to do garbage-collection. When you use 8 MB, that's probably not the case.
@15:21:05 # ./flashbench --open-au --open-au-nr=16 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 6.9M/s 2MiB 5.14M/s 1MiB 4.65M/s 512KiB 1.63M/s 256KiB 4.06M/s 128KiB 1.73M/s 64KiB 1.64M/s 32KiB 1.02M/s 16KiB 471K/s 8KiB 238K/s 4KiB 111K/s 2KiB 57.4K/s 1KiB 28.6K/s 512B 14.4K/s @17:58:45 # ./flashbench --open-au --open-au-nr=20 --erasesize=$[8 * 512 * 1024] /dev/sdd --blocksize=512 4MiB 4.54M/s 2MiB 4.98M/s 1MiB 1.21M/s 512KiB 947K/s 256KiB 491K/s 128KiB 285K/s 64KiB 109K/s 32KiB 73.6K/s 16KiB 29.9K/s 8KiB 13.5K/s 4KiB 6.77K/s 2KiB 3.4K/s Terminated (was running from 1800 overnight until 1042, so I killed it)
Right, this is what I mean with slow. You can normally use 'blocksize=32768' here, the only difference that makes is to stop it earlier. To find the exact number, I would suggest trying 17, 18 and 19 erase blocks to see which one is the first one that is slow.
Slow here means that every single line is only half as fast as the previous one, because each write access independent of the size always takes the same time when the card has to garbage-collect one erase block, the effect that I described in https://lwn.net/Articles/428799/.
Now the tests with "--random" and correct 8MB erasesize:
@10:58:54 # ./flashbench --open-au --open-au-nr=1 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 7.11M/s 4MiB 21.9M/s 2MiB 13.2M/s 1MiB 8.37M/s 512KiB 7.02M/s 256KiB 6.48M/s 128KiB 6.15M/s 64KiB 5.86M/s 32KiB 5.45M/s 16KiB 4.1M/s 8KiB 1.75M/s 4KiB 1.22M/s 2KiB 512K/s 1KiB 266K/s 512B 136K/s
Ok, this is significantly slower, so the stick does something different for random writes.
@17:33:20 # ./flashbench --open-au --open-au-nr=16 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.2M/s 4MiB 10.4M/s 2MiB 3.28M/s 1MiB 3.02M/s 512KiB 2.94M/s 256KiB 2.34M/s 128KiB 2.48M/s 64KiB 1.07M/s 32KiB 911K/s 16KiB 397K/s 8KiB 240K/s 4KiB 115K/s 2KiB 58K/s 1KiB 29K/s 512B 14.5K/s @22:46:38 # ./flashbench --open-au --open-au-nr=20 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=512 --random 8MiB 22.2M/s 4MiB 6.6M/s 2MiB 2.46M/s 1MiB 1.14M/s 512KiB 540K/s 256KiB 362K/s 128KiB 200K/s 64KiB 103K/s 32KiB 52.9K/s 16KiB 27.2K/s 8KiB 13.7K/s
The cutoff with --random seems to be still at the same point between 16 and 20. That is good.
What next?
Just try these:
for i in 16 17 18 19 20 ; do echo == $i == ./flashbench --open-au --open-au-nr=$i --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 done
You can stop it as soon as it obviously goes "slow".
Arnd
On Freitag, 3. Juni 2011 Arnd Bergmann wrote:
for i in 16 17 18 19 20 ; do echo == $i == ./flashbench --open-au --open-au-nr=$i --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 done
You can stop it as soon as it obviously goes "slow".
@11:17:36 # ./flashbench --open-au --open-au-nr=16 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 8MiB 19.3M/s 4MiB 9.94M/s 2MiB 4.17M/s 1MiB 3.37M/s 512KiB 2.6M/s 256KiB 2.26M/s 128KiB 2.62M/s 64KiB 1.92M/s 32KiB 1.23M/s @11:24:50 # ./flashbench --open-au --open-au-nr=17 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 8MiB 22.1M/s 4MiB 9.92M/s 2MiB 2.6M/s 1MiB 2.98M/s 512KiB 2.91M/s 256KiB 3.04M/s 128KiB 2.93M/s 64KiB 1.44M/s 32KiB 940K/s @11:33:30 # ./flashbench --open-au --open-au-nr=18 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 8MiB 17.5M/s 4MiB 10.3M/s 2MiB 2.84M/s 1MiB 2.99M/s 512KiB 2.2M/s 256KiB 3.19M/s 128KiB 3.15M/s 64KiB 1.52M/s 32KiB 983K/s @11:42:34 # ./flashbench --open-au --open-au-nr=19 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 8MiB 22.2M/s 4MiB 10.2M/s 2MiB 2.96M/s 1MiB 1.86M/s 512KiB 898K/s 256KiB 488K/s 128KiB 273K/s 64KiB 142K/s 32KiB 71.6K/s @12:59:12 # ./flashbench --open-au --open-au-nr=20 --erasesize=$[8 * 1024 * 1024] /dev/sdd --blocksize=32768 8MiB 22.1M/s 4MiB 9.09M/s 2MiB 3.06M/s 1MiB 1.78M/s 512KiB 728K/s 256KiB 478K/s 128KiB 246K/s 64KiB 126K/s 32KiB 65.3K/s
As test #18 was running 9 minutes, but test #19 1h17m, I guess 18 would be the solution, right? Anything else to consider? What would be a good partition starting point? Is that stick FAT optimized?
On Monday 06 June 2011, Michael Monnerie wrote:
As test #18 was running 9 minutes, but test #19 1h17m, I guess 18 would be the solution, right?
Yes, exactly. Thanks for the data, I'll add it to the wiki.
Anything else to consider? What would be a good partition starting point? Is that stick FAT optimized?
I would start every partition at a multiple of 8 MB.
You can check if the FAT area is doing something special using
flashbench --findfat --fat-nr=5 --erasesize=$[8 * 1024*1024] --random --blocksize=512
I don't expect anything special to show up there, because the stick can already handle random writes anywhere.
Using FAT32 is probably best because it uses 32 KB clusters if you tell it to do that. Other file systems should be fine as well, they won't suffer from lack of open erase blocks, although the 32 KB clusters will hurt a bit when writing small files, regardless of the file system you use.
I hope we can get other file systems in Linux to support large clusters soon.
Arnd
flashbench-results@lists.linaro.org