[Flashbench] flashbench of OlexM1 w/SanDisk 32GB CF-kort

Arnd Bergmann arnd at arndb.de
Sun Apr 17 21:52:10 UTC 2011


On Wednesday 13 April 2011, Joacim Thomassen wrote:
> Hi Arnd,
> 
> I tried to deliver the test result to the list but got this error:
> 
> Delivery to the following recipient failed permanently:
> 
>      flashbench-erase at lists.linaro.org
> 
> Technical details of permanent failure: 
> Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 unknown user (state 14).
> 

Where did you get that address? The correct email is
flashbench-results at lists.linaro.org, if I wrote that incorrectly somewhere,
I should definitely correct it.

> Anyway, here are the results for the SanDisk Compact Flash card:

Thank you very much!

> ubuntu at ubuntu:~$ cat /proc/partitions
> major minor  #blocks  name
> 
>    7        0     687976 loop0
>    8        0   31250432 sda
>    8        1   31250416 sda1
> 
> ubuntu at ubuntu:~$ sudo hdparm -i /dev/sda
> 
> /dev/sda:
> 
>  Model=SanDisk, FwRev=HDX, SerialNo=CBZ011811204505
>  Config={ HardSect NotMFM Removeable DTR>10Mbs nonMagnetic }
>  RawCHS=62004/16/63, TrkSize=0, SectSize=576, ECCbytes=4
>  BuffType=DualPort, BuffSize=1kB, MaxMultSect=1, MultSect=1
>  CurCHS=62004/16/63, CurSects=62500032, LBA=yes, LBAsects=62500864
>  IORDY=no, 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
>  AdvancedPM=yes: disabled (255) WriteCache=enabled
>  Drive conforms to: Unspecified:  ATA/ATAPI-4
> 
>  * signifies the current active mode
> 
> ubuntu at ubuntu:~$ sudo flashbench -a -b 1024 /dev/sda
> align 8589934592	pre 717µs	on 997µs	post 765µs	diff 256µs
> align 4294967296	pre 729µs	on 978µs	post 751µs	diff 238µs
> align 2147483648	pre 712µs	on 1ms	post 761µs	diff 266µs
> align 1073741824	pre 760µs	on 997µs	post 750µs	diff 242µs
> align 536870912	pre 752µs	on 1.02ms	post 793µs	diff 252µs
> align 268435456	pre 759µs	on 1.04ms	post 788µs	diff 265µs
> align 134217728	pre 802µs	on 1.04ms	post 797µs	diff 240µs
> align 67108864	pre 844µs	on 1.08ms	post 839µs	diff 242µs
> align 33554432	pre 729µs	on 1.01ms	post 791µs	diff 246µs
> align 16777216	pre 705µs	on 987µs	post 795µs	diff 237µs
> align 8388608	pre 716µs	on 954µs	post 765µs	diff 213µs
> align 4194304	pre 717µs	on 988µs	post 797µs	diff 231µs
> align 2097152	pre 718µs	on 991µs	post 799µs	diff 232µs
> align 1048576	pre 717µs	on 986µs	post 796µs	diff 230µs
> align 524288	pre 717µs	on 987µs	post 797µs	diff 230µs
> align 262144	pre 707µs	on 990µs	post 798µs	diff 237µs
> align 131072	pre 678µs	on 985µs	post 790µs	diff 251µs
> align 65536	pre 678µs	on 957µs	post 763µs	diff 236µs
> align 32768	pre 680µs	on 957µs	post 761µs	diff 237µs
> align 16384	pre 763µs	on 904µs	post 650µs	diff 198µs
> align 8192	pre 762µs	on 801µs	post 764µs	diff 37.6µs
> align 4096	pre 763µs	on 797µs	post 764µs	diff 34.2µs
> align 2048	pre 765µs	on 799µs	post 764µs	diff 34.5µs

The data must be misleading on this card. Unfortunately, flashbench -a is
not completely reliable in finding out the erase block size. From the
LBAsects=62500864 line above, I conclude that the actual size of the erase block
is probably 2 MB, as that is the largest power-of-two number that is a 
fraction of the size (15259 * 2 MB).

> root at ubuntu:/home/ubuntu/flashbench# for i in `seq 1 10`; do echo $i;
> flashbench -O --erasesize=$[64 * 1024 * 1024] /dev/sda --open-au-nr=$i
> --random; done
> 1
> 64MiB   39.3M/s
> 32MiB   70.1M/s
> 16MiB   70.2M/s
> 8MiB    25.8M/s
> 4MiB    18M/s
> 2MiB    9.41M/s
> 1MiB    4.93M/s
> 512KiB  2.35M/s
> 256KiB  1.14M/s
> 128KiB  596K/s
> 64KiB   3.87M/s
> 32KiB   3.05M/s
> 16KiB   2.12M/s

The performance of this card is pretty amazing, I have not seen that yet on
a CF card. There might be a write cache on the card itself, as hdparm
claims, so if that is the case, you should probably disable that cache using
hdparm -W 0 /dev/sda during your measurements (not during actual use of course).

One thing that is rather clear from this data is that this card is heavily
optimized for extremely long writes, 16 MB or longer seem to be ideal.
When you do --random writes, writing 128 KB takes roughly the same time as
writing 16 MB! This could be a hint that the erase size is really 16 MB.

The card evidently also optimizes for random writes up to 64 KB by treating
them differently than any larger ones. When you do a 128 KB write or larger,
it must be writing the entire 16 MB anyway.

It would be nice if you could rerun your test without --random, and with
both 2 MB and 16 MB erase size.

> 2
> 64MiB   51.6M/s
> 32MiB   70.1M/s
> 16MiB   70.2M/s
> 8MiB    48.9M/s
> 4MiB    14.7M/s
> 2MiB    5.82M/s
> 1MiB    3.22M/s
> 512KiB  1.57M/s
> 256KiB  790K/s
> 128KiB  392K/s
> 64KiB   2.72M/s
> 32KiB   1.74M/s
> 16KiB   1.61M/s

Unfortunately, the larger numbers don't provide more insight here.
 
> root at ubuntu:/home/ubuntu/flashbench# flashbench --findfat --fat-nr=10
> --erasesize=$[64 * 1024 * 1024] --blocksize=1024 /dev/sda
> 64MiB   47.1M/s  70M/s    69.9M/s  69.8M/s  69M/s 70.3M/s 70.4M/s
> 70.3M/s  65.5M/s  70.2M/s
> 32MiB   69.3M/s  70.4M/s  70M/s    70.4M/s  70.4M/s  70.4M/s  68.4M/s
> 70.4M/s  70.5M/s  70.4M/s
> 16MiB   43.7M/s  58.2M/s  70.4M/s  70.4M/s  69.4M/s  66.4M/s  70.3M/s
> 69.4M/s  58.6M/s  70.5M/s
> 8MiB    70.3M/s  70.4M/s  69.4M/s  58M/s    70.3M/s  58.7M/s  38.8M/s
> 70.3M/s  69.3M/s  70.3M/s
> 4MiB    69.3M/s  69.9M/s  70.3M/s  70.3M/s  69.1M/s  70.3M/s  70.3M/s
> 66.2M/s  69.3M/s  70.3M/s
> 2MiB    69.1M/s  69.8M/s  70.2M/s  66.1M/s  70.1M/s  70.2M/s  68.1M/s
> 70.3M/s  70.2M/s  70.2M/s
> 1MiB    69.3M/s  64.6M/s  70M/s    70.1M/s  64.8M/s  69.9M/s  70M/s
> 64.5M/s  69.9M/s  65.6M/s
> 512KiB  65.2M/s  61.1M/s  68.6M/s  68.7M/s  69.7M/s  69.7M/s  43M/s
> 69.5M/s  69.6M/s  68.6M/s
> 256KiB  60M/s    61M/s    60.8M/s  60.8M/s  60.4M/s  60.9M/s  60.9M/s
> 60.7M/s  60.2M/s  60.8M/s
> 128KiB  68M/s    61.2M/s  63.4M/s  69.3M/s  69.3M/s  68.4M/s  68.4M/s
> 69.3M/s  69.3M/s  69.3M/s
> 64KiB   37M/s    54.8M/s  55.4M/s  54.9M/s  55.2M/s  55.3M/s  55.4M/s
> 54.7M/s  55.4M/s  55.8M/s
> 32KiB   23.9M/s  23.9M/s  23.9M/s  24M/s    24.2M/s  19.9M/s  24.1M/s
> 24.2M/s  23.9M/s  24M/s
> 16KiB   8.89M/s  8.91M/s  8.94M/s  8.28M/s  8.95M/s  8.99M/s  8.82M/s
> 8.73M/s  8.91M/s  8.97M/s
> 8KiB    5.02M/s  4.81M/s  5.03M/s  5.02M/s  5.02M/s  5.02M/s  5.02M/s
> 5.03M/s  5.02M/s  5.03M/s
> 4KiB    2.11M/s  2.14M/s  2.11M/s  2.14M/s  2.12M/s  2.14M/s  2.12M/s
> 2.11M/s  2.12M/s  2.14M/s
> 2KiB    1.1M/s   1.11M/s  1.11M/s  1.11M/s  1.11M/s  1.09M/s  1.11M/s
> 1.11M/s  1.11M/s  1.11M/s
> 1KiB    545K/s   546K/s   543K/s   546K/s   546K/s   546K/s   547K/s
> 544K/s   546K/s   546K/s

Fascinating. It's not possible to actually see any FAT optimizations here
(I would be surprised if this card did that), but the numbers for each
of the columns are about the same as on my expensive Intel X25 SSD.

What is obvious here is that 64 KB is the minimum size required to get
the full performance.

	Arnd



More information about the Flashbench-results mailing list