arnd@wuerfel:~/flashbench$ sudo hdparm -I /dev/sde
/dev/sde:
CompactFlash ATA device Model Number: LEXAR ATA FLASH CARD Serial Number: 41163033400000500C93 Firmware Revision: 20100407 Standards: Likely used: 6 Configuration: Logical max current cylinders 31012 31012 heads 16 16 sectors/track 63 63 -- CHS current addressable sectors: 31260096 LBA user addressable sectors: 31260096 Logical/Physical Sector size: 512 bytes device size with M = 1024*1024: 15263 MBytes device size with M = 1000*1000: 16005 MBytes (16 GB) cache/buffer size = 1 KBytes (type=DualPort) Capabilities: LBA, IORDY(can be disabled) bytes avail on r/w long: 4 Standby timer values: spec'd by Vendor R/W multiple sector transfer: Max = 1 Current = 0 Advanced power management level: disabled DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 udma6 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=120ns IORDY flow control=120ns Commands/features: Enabled Supported: Power Management feature set Write cache WRITE_BUFFER command READ_BUFFER command NOP cmd CFA feature set Advanced Power Management feature set Mandatory FLUSH_CACHE * Gen1 signaling speed (1.5Gb/s) * Host-initiated interface power management * CFA advanced modes: pio5 *pio6 mdma3 mdma4 * CFA Power Level 1 (max 500mA) Integrity word not set (found 0xbb00, expected 0x89a5)
arnd@wuerfel:~/flashbench$ sudo hdparm -i /dev/sde
/dev/sde:
Model=LEXAR ATA FLASH CARD, FwRev=20100407, SerialNo=41163033400000500C93 Config={ HardSect NotMFM Removeable DTR>10Mbs nonMagnetic } RawCHS=31012/16/63, TrkSize=0, SectSize=576, ECCbytes=4 BuffType=DualPort, BuffSize=1kB, MaxMultSect=1, MultSect=off CurCHS=31012/16/63, CurSects=31260096, LBA=yes, LBAsects=31260096 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 udma6 AdvancedPM=yes: disabled (255) WriteCache=disabled
arnd@wuerfel:~/flashbench$ sudo fdisk -lu /dev/sde
Disk /dev/sde: 16.0 GB, 16005169152 bytes 256 heads, 63 sectors/track, 1938 cylinders, total 31260096 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Device Boot Start End Blocks Id System /dev/sde1 * 63 31259087 15629512+ b W95 FAT32
arnd@wuerfel:~/flashbench$ sudo ./flashbench -a /dev/sde --blocksize=1024 --count=32 align 2147483648 pre 248µs on 373µs post 256µs diff 121µs align 1073741824 pre 248µs on 370µs post 252µs diff 120µs align 536870912 pre 247µs on 368µs post 251µs diff 119µs align 268435456 pre 246µs on 368µs post 251µs diff 119µs align 134217728 pre 246µs on 368µs post 251µs diff 120µs align 67108864 pre 244µs on 367µs post 249µs diff 121µs align 33554432 pre 247µs on 370µs post 253µs diff 119µs align 16777216 pre 256µs on 378µs post 253µs diff 124µs align 8388608 pre 263µs on 288µs post 255µs diff 28.8µs align 4194304 pre 263µs on 289µs post 255µs diff 29.3µs align 2097152 pre 260µs on 286µs post 254µs diff 28.4µs align 1048576 pre 262µs on 288µs post 256µs diff 28.8µs align 524288 pre 263µs on 289µs post 257µs diff 28.7µs align 262144 pre 262µs on 287µs post 255µs diff 28.4µs align 131072 pre 260µs on 285µs post 260µs diff 24.7µs align 65536 pre 262µs on 288µs post 260µs diff 26.2µs align 32768 pre 261µs on 287µs post 262µs diff 25.8µs align 16384 pre 262µs on 272µs post 262µs diff 10.2µs align 8192 pre 262µs on 265µs post 263µs diff 2.7µs align 4096 pre 263µs on 266µs post 262µs diff 3.27µs align 2048 pre 262µs on 264µs post 262µs diff 2.37µs
## Guessing 16 MB erase block size --> huge!
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=1024 --open- au-nr=1 16MiB 55.9M/s 8MiB 56M/s 4MiB 56.1M/s 2MiB 56M/s 1MiB 55.7M/s 512KiB 55.9M/s 256KiB 55.6M/s 128KiB 55.8M/s 64KiB 54.4M/s 32KiB 51.9M/s 16KiB 42.6M/s 8KiB 30.6M/s 4KiB 2.97M/s 2KiB 1.5M/s 1KiB 759K/s
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=4096 -- open-au-nr=1 --random 16MiB 56.7M/s 8MiB 44.9M/s 4MiB 23.6M/s 2MiB 22.8M/s 1MiB 22.8M/s 512KiB 22.8M/s 256KiB 22.8M/s 128KiB 22.7M/s 64KiB 20.8M/s 32KiB 16.2M/s 16KiB 8.73M/s 8KiB 3.97M/s 4KiB 2.01M/s
## random write at half speed down to 64KiB, much slower below --> 64 KB superpages?
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=8192 -- open-au-nr=2 16MiB 56.8M/s 8MiB 56.8M/s 4MiB 56.1M/s 2MiB 55M/s 1MiB 52.9M/s 512KiB 48.9M/s 256KiB 45.3M/s 128KiB 37.9M/s 64KiB 28.7M/s 32KiB 17.4M/s 16KiB 7.67M/s 8KiB 3.78M/s arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=8192 -- open-au-nr=2 --random 16MiB 22.7M/s 8MiB 44.3M/s 4MiB 23.1M/s 2MiB 22.8M/s 1MiB 22.6M/s 512KiB 22.2M/s 256KiB 21.6M/s 128KiB 20.5M/s 64KiB 17.3M/s 32KiB 12.2M/s 16KiB 6.47M/s 8KiB 3.01M/s
## alternating between erase blocks shows noticeable degradation anywhere below 2MB writes. ## enabling/disabling write cache with hdparm -W did not change this. # The weird anomaly for random writes at 8 MB is reproducible.
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=1048576 -- open-au-nr=8 16MiB 56.8M/s 8MiB 56.5M/s 4MiB 55.9M/s 2MiB 54.8M/s 1MiB 52.8M/s arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=1048576 -- open-au-nr=9 16MiB 57.2M/s 8MiB 50M/s 4MiB 56.3M/s 2MiB 55.1M/s 1MiB 52.9M/s arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=1048576 -- open-au-nr=10 16MiB 49.7M/s 8MiB 56.8M/s 4MiB 56.3M/s 2MiB 55.1M/s 1MiB 52.8M/s arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=1048576 -- open-au-nr=11 16MiB 57.1M/s 8MiB 51.2M/s 4MiB 56.4M/s 2MiB 55.1M/s 1MiB 53.1M/s
## Same performance up to 11 erase blocks
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=1048576 -- open-au-nr=12 16MiB 56.8M/s 8MiB 28.4M/s 4MiB 9.88M/s 2MiB 5.26M/s 1MiB 2.76M/s arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=2048 -- open-au-nr=12 16MiB 57.3M/s 8MiB 31.1M/s 4MiB 9.93M/s 2MiB 5.29M/s
## At 12 Erase blocks massive degradation
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=2048 -- open-au-nr=11 16MiB 57M/s 8MiB 56.7M/s 4MiB 56.2M/s 2MiB 55.2M/s 1MiB 53M/s 512KiB 49.1M/s 256KiB 45.1M/s 128KiB 37.8M/s 64KiB 28.5M/s 32KiB 17.3M/s 16KiB 7.61M/s 8KiB 3.76M/s 4KiB 1.99M/s 2KiB 985K/s
## 11 * 16 MB is the fastest we get.
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=8388608 --blocksize=8192 --open- au-nr=11 8MiB 58.3M/s 4MiB 44.5M/s 2MiB 45M/s 1MiB 15.3M/s 512KiB 50.2M/s 256KiB 39.9M/s 128KiB 36.7M/s 64KiB 12.6M/s 32KiB 17.6M/s 16KiB 5.6M/s 8KiB 3.2M/s
## trying with 8 MB erase size shows significantly worse results due to more garbage ## collection overhead
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=1677721--blocksize=8192 --open- au-nr=11 --random 16MiB 41M/s 8MiB 26.5M/s 4MiB 23.3M/s 2MiB 22.7M/s 1MiB 22.6M/s 512KiB 22.3M/s 256KiB 21.6M/s 128KiB 20.4M/s 64KiB 17.1M/s 32KiB 12.1M/s 16KiB 6.43M/s 8KiB 3M/s arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=8192 -- open-au-nr=11 --random 16MiB 22.7M/s 8MiB 40.8M/s 4MiB 23.1M/s 2MiB 22.7M/s 1MiB 22.5M/s 512KiB 22.2M/s 256KiB 21.5M/s 128KiB 20.4M/s 64KiB 17.1M/s 32KiB 12.1M/s 16KiB 6.42M/s 8KiB 3M/s
## Random write also fine up to 11 erase blocks
arnd@wuerfel:~/flashbench$ sudo ./flashbench --open-au /dev/sde --erasesize=16777216 --blocksize=8192 -- open-au-nr=12 --random 16MiB 24.1M/s 8MiB 18.4M/s 4MiB 10.4M/s 2MiB 5.35M/s 1MiB 2.78M/s 512KiB 1.42M/s 256KiB 723K/s 128KiB 364K/s 64KiB 182K/s 32KiB 91.3K/s
## cannot do 12 erase blocks
^Carnd@wuerfel:~/flashbench$ sudo ./flashbench --findfat /dev/sde --erasesize=1677721--blocksize=512 --fat- nr=4 --random 16MiB 23M/s 23M/s 57.7M/s 23M/s 8MiB 45.2M/s 45.3M/s 45.3M/s 22.9M/s 4MiB 23M/s 23.7M/s 23.5M/s 22.9M/s 2MiB 22.8M/s 22.8M/s 22.9M/s 22.9M/s 1MiB 22.9M/s 23M/s 22.9M/s 22.8M/s 512KiB 22.9M/s 22.8M/s 22.9M/s 23M/s 256KiB 22.9M/s 23M/s 22.8M/s 22.8M/s 128KiB 22.8M/s 22.8M/s 22.8M/s 22.8M/s 64KiB 20.8M/s 20.8M/s 20.9M/s 20.8M/s 32KiB 16.2M/s 16.3M/s 16.2M/s 16.3M/s
## no fat area
flashbench-results@lists.linaro.org