==> /sys/block/mmcblk0/device/cid <==
02544d5341303447062263db5f00ac00
==> /sys/block/mmcblk0/device/csd <==
400e00325b5900001d6f7f800a400000
==> /sys/block/mmcblk0/device/date <==
12/2010
==> /sys/block/mmcblk0/device/driver <==
head: error reading `/sys/block/mmcblk0/device/driver': Is a directory
==> /sys/block/mmcblk0/device/erase_size <==
512
==> /sys/block/mmcblk0/device/fwrev <==
0x6
==> /sys/block/mmcblk0/device/hwrev <==
0x0
==> /sys/block/mmcblk0/device/manfid <==
0x000002
==> /sys/block/mmcblk0/device/name <==
SA04G
==> /sys/block/mmcblk0/device/oemid <==
0x544d
==> /sys/block/mmcblk0/device/power <==
head: error reading `/sys/block/mmcblk0/device/power': Is a directory
==> /sys/block/mmcblk0/device/preferred_erase_size <==
4194304
==> /sys/block/mmcblk0/device/scr <==
0235800001000000
==> /sys/block/mmcblk0/device/serial <==
0x2263db5f
==> /sys/block/mmcblk0/device/subsystem <==
head: error reading `/sys/block/mmcblk0/device/subsystem': Is a directory
==> /sys/block/mmcblk0/device/type <==
SD
Disk /dev/mmcblk0: 3951 MB, 3951034368 bytes
255 heads, 63 sectors/track, 480 cylinders, total 7716864 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/mmcblk0p1 * 63 240974 120456 c W95 FAT32 (LBA)
/dev/mmcblk0p2 240975 7132859 3445942+ 83 Linux
$ sudo ./flashbench -a /dev/mmcblk0 --blocksize 1024align 402653184 pre 1.51ms on 2.84ms post 1.66ms diff 1.25ms
align 268435456 pre 1.49ms on 2.86ms post 1.66ms diff 1.28ms
align 201326592 pre 1.51ms on 2.85ms post 1.66ms diff 1.26ms
align 134217728 pre 1.53ms on 2.88ms post 1.68ms diff 1.28ms
align 100663296 pre 1.52ms on 2.87ms post 1.67ms diff 1.27ms
align 67108864 pre 1.52ms on 2.86ms post 1.66ms diff 1.26ms
align 50331648 pre 1.53ms on 2.85ms post 1.66ms diff 1.26ms
align 33554432 pre 1.52ms on 2.85ms post 1.66ms diff 1.26ms
align 25165824 pre 1.52ms on 2.85ms post 1.66ms diff 1.26ms
align 16777216 pre 1.51ms on 2.84ms post 1.66ms diff 1.25ms
align 12582912 pre 1.51ms on 2.84ms post 1.66ms diff 1.25ms
align 8388608 pre 1.42ms on 2.75ms post 1.66ms diff 1.21ms
align 6291456 pre 1.54ms on 1.56ms post 1.55ms diff 14.4µs
align 4194304 pre 1.41ms on 2.63ms post 1.54ms diff 1.15ms
align 3145728 pre 1.55ms on 2.66ms post 1.55ms diff 1.11ms
align 2097152 pre 1.54ms on 1.56ms post 1.55ms diff 14.2µs
align 1572864 pre 1.54ms on 2.65ms post 1.54ms diff 1.11ms
align 1048576 pre 1.54ms on 1.56ms post 1.54ms diff 16.2µs
align 786432 pre 1.54ms on 2.65ms post 1.54ms diff 1.11ms
align 524288 pre 1.54ms on 1.56ms post 1.54ms diff 15.8µs
align 393216 pre 1.54ms on 2.65ms post 1.54ms diff 1.11ms
align 262144 pre 1.54ms on 1.56ms post 1.54ms diff 15.6µs
align 196608 pre 1.54ms on 2.65ms post 1.54ms diff 1.11ms
align 131072 pre 1.54ms on 1.56ms post 1.54ms diff 16.1µs
align 98304 pre 1.54ms on 2.65ms post 1.54ms diff 1.11ms
align 65536 pre 1.54ms on 1.56ms post 1.54ms diff 16.1µs
align 49152 pre 1.54ms on 2.64ms post 1.54ms diff 1.1ms
align 32768 pre 1.54ms on 1.55ms post 1.54ms diff 15.5µs
align 24576 pre 1.54ms on 2.65ms post 1.54ms diff 1.11ms
align 16384 pre 1.54ms on 1.56ms post 1.54ms diff 15.6µs
align 12288 pre 1.54ms on 1.54ms post 1.54ms diff -649ns
align 8192 pre 1.54ms on 1.56ms post 1.54ms diff 15.7µs
align 6144 pre 1.54ms on 1.54ms post 1.54ms diff 660ns
align 4096 pre 1.54ms on 1.54ms post 1.54ms diff 458ns
align 3072 pre 1.54ms on 1.54ms post 1.54ms diff -132ns
align 2048 pre 1.54ms on 1.54ms post 1.54ms diff -1008ns
$ sudo ./flashbench --open-au --open-au-nr=1 --erasesize=$[4*1024*1024] --blocksize=512 /dev/mmcblk0 --offset=$[32 * 1024 * 1024]
4MiB 3.35M/s
2MiB 2.56M/s
1MiB 1.77M/s
512KiB 1.76M/s
256KiB 1.76M/s
128KiB 2.54M/s
64KiB 4.59M/s
32KiB 4.46M/s
16KiB 3.54M/s
8KiB 2.93M/s
4KiB 2.25M/s
2KiB 22.1K/s
arnd@klappe2:~/git/flashbench$ sudo ./flashbench --open-au --open-au-nr=2 --erasesize=$[4*1024*1024] --blocksize=512 /dev/mmcblk0 --offset=$[32 * 1024 * 1024]
4MiB 4.17M/s
2MiB 2.76M/s
1MiB 1.38M/s
512KiB 700K/s
256KiB 355K/s
^C
arnd@klappe2:~/git/flashbench$ sudo ./flashbench --open-au --open-au-nr=1 --erasesize=$[4*1024*1024] --blocksize=512 /dev/mmcblk0 --offset=$[32 * 1024 * 1024] --random
4MiB 3.05M/s
2MiB 1.18M/s
1MiB 1.4M/s
512KiB 556K/s
256KiB 310K/s
128KiB 141K/s
^C
Dear Friends and partners ,
Our company focus on the OEM and ODM business with mobile phone.
Anything more you want to know, please send us email.
Best wishes
Juce
Tel: 86-0755-85282599
Fax: 86-0755-81752355
E-mail: elink(a)vip.188.com / sales(a)elink-mobile.com
Web size: www.elink-mobile.com
Factory Address: 5/F, Building 21, ChenTian Industrial Park, Shenzhen,
GuangDong Province, China
Hey guys,
Our company focus on the OEM and ODM business with mobile phone.
Attached is our new items, please kindly check.
New price come out, please contact us for the detail.
Best Regards
Juce
Mobile: 86-13424432252
Tel:(86)755-85282599
Fax:(86)755-81752355
Web Size: www.elink-mobile.com
E-mail: elink(a)vip.188.com / sales(a)elink-mobile.com
Dear Product Manager
From google, we get to know that you focus on communication pruducts with high reputation.We are professional IP-PBX,GSM gateway manufacturer with high-quality and competitive price.
MyPBX STD V4 is the newest version that supports PSTN,GSM,VoIP trunks with FXS / FXO / PRI / BRI (ISDN) ports. It is embedded hybrid IP-PBX which caters for the small businesses.
Please feel free to contact me to get further information to open our cooperation relationship in 2011.
Thanks&Best Regards
Alex
Yeastar Technology Co.,Ltd
Web: www.yeastar.com
MSN: hqy(a)yeastar.com
Skype: Yeastar.hqy
Tel: +86 592 5503309 Ext.8026
Add: 202,No.23 Wanghai Road, 2nd Software Park, Xiamen, China
--------------------------------------------------------------------------------
# this is a 16 GB Patriot xporter XT Boost USB flash drive, lsusb claim
# 2 GB, but that is understandable
$ lsusb
Bus 001 Device 023: ID 13fe:3100 Kingston Technology Company Inc. 2 GB USB stick
# The erase block size is clearly 8 MB, page size is not clear from this:
$ sudo ./flashbench /dev/sdc -a --blocksize=1024
align 1610612736 pre 545µs on 872µs post 721µs diff 239µs
align 1073741824 pre 527µs on 811µs post 659µs diff 218µs
align 805306368 pre 547µs on 818µs post 673µs diff 208µs
align 536870912 pre 536µs on 814µs post 664µs diff 214µs
align 402653184 pre 548µs on 819µs post 666µs diff 212µs
align 268435456 pre 541µs on 822µs post 673µs diff 215µs
align 201326592 pre 548µs on 818µs post 658µs diff 215µs
align 134217728 pre 547µs on 822µs post 651µs diff 223µs
align 100663296 pre 554µs on 822µs post 654µs diff 218µs
align 67108864 pre 540µs on 823µs post 662µs diff 222µs
align 50331648 pre 528µs on 817µs post 644µs diff 231µs
align 33554432 pre 557µs on 815µs post 672µs diff 200µs
align 25165824 pre 543µs on 821µs post 680µs diff 209µs
align 16777216 pre 548µs on 822µs post 675µs diff 211µs
align 12582912 pre 666µs on 688µs post 660µs diff 25.3µs
align 8388608 pre 543µs on 819µs post 656µs diff 219µs
align 6291456 pre 658µs on 697µs post 663µs diff 36.3µs
align 4194304 pre 651µs on 697µs post 656µs diff 44.2µs
align 3145728 pre 668µs on 692µs post 672µs diff 21.7µs
align 2097152 pre 660µs on 688µs post 673µs diff 21.2µs
align 1572864 pre 664µs on 695µs post 666µs diff 30µs
align 1048576 pre 669µs on 696µs post 659µs diff 32.2µs
align 786432 pre 664µs on 697µs post 652µs diff 39.6µs
align 524288 pre 670µs on 698µs post 656µs diff 35.1µs
align 393216 pre 664µs on 697µs post 651µs diff 40µs
align 262144 pre 661µs on 696µs post 667µs diff 32.6µs
align 196608 pre 665µs on 695µs post 663µs diff 30.8µs
align 131072 pre 657µs on 680µs post 666µs diff 18.7µs
align 98304 pre 670µs on 684µs post 669µs diff 14.3µs
align 65536 pre 663µs on 684µs post 660µs diff 22.3µs
align 49152 pre 653µs on 895µs post 668µs diff 235µs
align 32768 pre 664µs on 684µs post 669µs diff 17.7µs
align 24576 pre 667µs on 685µs post 667µs diff 18.1µs
align 16384 pre 652µs on 894µs post 659µs diff 239µs
align 12288 pre 665µs on 685µs post 659µs diff 23.1µs
align 8192 pre 653µs on 681µs post 669µs diff 20.2µs
align 6144 pre 656µs on 683µs post 667µs diff 21.9µs
align 4096 pre 663µs on 676µs post 672µs diff 8.79µs
align 3072 pre 670µs on 670µs post 665µs diff 2.62µs
align 2048 pre 661µs on 677µs post 658µs diff 17.1µs
# Optimum I/O size is 64 KB, page size looks like 32 KB effective
sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=3 /dev/sdc --blocksize=4096
8MiB 15M/s
4MiB 14.9M/s
2MiB 14.9M/s
1MiB 15.4M/s
512KiB 15.7M/s
256KiB 13.1M/s
128KiB 13.1M/s
64KiB 16.4M/s
32KiB 10.9M/s
16KiB 3.12M/s
8KiB 1.67M/s
4KiB 861K/s
# six erase blocks is still fine
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=6 /dev/sdc
8MiB 15.3M/s
4MiB 14.6M/s
2MiB 14.2M/s
1MiB 14.9M/s
512KiB 15.4M/s
256KiB 13.5M/s
128KiB 12.3M/s
64KiB 16M/s
32KiB 10.6M/s
16KiB 3.16M/s
# ten erase block not so, gradual decline hints at log-structured writes:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=10 /dev/sdc
8MiB 14.8M/s
4MiB 12.9M/s
2MiB 10.5M/s
1MiB 6.79M/s
512KiB 4.25M/s
^C
# get the stick into fast case again, by writing to it with six blocks:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=6 /dev/sdc --blocksize=$[4 * 1024 * 1024]
8MiB 12.8M/s
4MiB 12.6M/s
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=6 /dev/sdc --blocksize=$[4 * 1024 * 1024]
8MiB 14.6M/s
4MiB 14.3M/s
# seven block still ok:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=7 /dev/sdc --blocksize=$[1 * 1024 * 1024]
8MiB 14.3M/s
4MiB 14.4M/s
2MiB 14M/s
1MiB 14.5M/s
# eight blocks ok:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=8 /dev/sdc --blocksize=$[32 * 1024]
8MiB 14.7M/s
4MiB 14.1M/s
2MiB 14.5M/s
1MiB 14.9M/s
512KiB 15M/s
256KiB 13.3M/s
128KiB 12M/s
64KiB 16.4M/s
32KiB 10.4M/s
# nine blocks is where we hit the wall, though 16 KB and smaller is ok:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=9 /dev/sdc --blocksize=$[32 * 1024]
8MiB 14.7M/s
4MiB 13.9M/s
2MiB 12.3M/s
1MiB 10M/s
512KiB 7.11M/s
256KiB 4.8M/s
128KiB 2.51M/s
64KiB 1.44M/s
32KiB 726K/s
16KiB 3.02M/s
8KiB 1.51M/s
4KiB 782K/s
# resetting the device by writing 8 blocks again:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=8 /dev/sdc --blocksize=$[4 * 1024 * 1024]
8MiB 14.6M/s
4MiB 14.6M/s
# trying eight blocks with random access, the device copes ok, but not
# perfect, another indication for log-structured:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=8 /dev/sdc --blocksize=$[4 * 1024] --random
8MiB 15M/s
4MiB 11.6M/s
2MiB 8.3M/s
1MiB 7.84M/s
512KiB 5.3M/s
256KiB 6.53M/s
128KiB 4.79M/s
64KiB 7.37M/s
32KiB 6.69M/s
16KiB 3.08M/s
8KiB 1.55M/s
4KiB 787K/s
# nine blocks random I/O: somewhat worse than 9 blocks linear, 16 KB
# blocks are still as fast as always
$ sudo ./flashbench --erasesize=$[8*1024*1024] --open-au --open-au-nr=9 /dev/sdc --blocksize=$[4 * 1024] --random
8MiB 14.6M/s
4MiB 11.3M/s
2MiB 7.05M/s
1MiB 4.74M/s
512KiB 3.21M/s
256KiB 1.8M/s
128KiB 1.13M/s
64KiB 694K/s
32KiB 376K/s
16KiB 2.96M/s
8KiB 1.45M/s
4KiB 739K/s
# Looking for FAT optimizations, nothing there:
$ sudo ./flashbench --erasesize=$[8*1024*1024] --findfat --fat-nr=4 /dev/sdc --blocksize=$[4 * 1024] --random
8MiB 15.2M/s 16.3M/s 14.3M/s 14.1M/s
4MiB 11.4M/s 11.4M/s 11.7M/s 12M/s
2MiB 8.32M/s 8.3M/s 8.32M/s 8.41M/s
1MiB 7.93M/s 7.93M/s 7.93M/s 7.89M/s
512KiB 5.34M/s 5.32M/s 5.33M/s 5.34M/s
256KiB 6.6M/s 6.51M/s 6.6M/s 6.59M/s
128KiB 4.85M/s 4.86M/s 4.85M/s 4.85M/s
64KiB 7.48M/s 7.51M/s 7.52M/s 7.48M/s
32KiB 6.79M/s 6.91M/s 6.96M/s 6.97M/s
16KiB 3.18M/s 3.19M/s 3.2M/s 3.2M/s
8KiB 1.61M/s 1.62M/s 1.62M/s 1.61M/s
4KiB 820K/s 819K/s 812K/s 818K/s
Verdict: Decent algorithm, the stick assumes random writes when accessed with 16 KB blocks
but linear writes for anything larger. Linear write performance good, even across many
erase blocks.
On Thursday 24 March 2011, Michael Monnerie wrote:
> We could speak german, I guess?
Yes, but I'd prefer to keep the discussion on the mailing list
if interesting results come up.
> On Donnerstag, 24. März 2011 Arnd Bergmann wrote:
> >
> > Are these results reproducible? It's not at all clear to me that the
> > erase size is really 4 MB, it could also be 1 MB for instance,
> > especially if your stick is from before 2010. You can rerun the
> > command with --count=100 or more, or with larger block sizes to get
> > a better feeling.
>
> # ./flashbench -a /dev/sde --blocksize=4096 --count=100
> sched_setscheduler: Operation not permitted
> align 536870912 pre 703µs on 798µs post 666µs diff 114µs
> align 268435456 pre 700µs on 753µs post 681µs diff 62.8µs
> align 134217728 pre 786µs on 783µs post 645µs diff 67.4µs
> align 67108864 pre 723µs on 772µs post 675µs diff 73.3µs
> align 33554432 pre 701µs on 762µs post 674µs diff 74.4µs
> align 16777216 pre 701µs on 741µs post 685µs diff 48.3µs
> align 8388608 pre 695µs on 749µs post 668µs diff 66.8µs
> align 4194304 pre 706µs on 791µs post 671µs diff 102µs
> align 2097152 pre 674µs on 707µs post 692µs diff 23.9µs
> align 1048576 pre 683µs on 726µs post 701µs diff 34.3µs
> align 524288 pre 671µs on 726µs post 717µs diff 32.3µs
> align 262144 pre 698µs on 713µs post 687µs diff 20.7µs
> align 131072 pre 682µs on 740µs post 704µs diff 46.9µs
> align 65536 pre 687µs on 727µs post 697µs diff 35.1µs
> align 32768 pre 712µs on 722µs post 692µs diff 19.9µs
> align 16384 pre 667µs on 699µs post 674µs diff 27.9µs
> align 8192 pre 702µs on 770µs post 686µs diff 75.8µs
Ok, this is much clearer: I'm pretty sure that it's either 4 MB or 8 MB,
based on this result. Note how all diff values below 4 MB are smaller than
all diff values above 4 MB. Something strange is going at at 4 MB, so it's
not clear whether it belongs to the upper or lower half.
> # ./flashbench -a /dev/sde --blocksize=8192 --count=50
> sched_setscheduler: Operation not permitted
> align 536870912 pre 879µs on 899µs post 858µs diff 30.9µs
> align 268435456 pre 847µs on 906µs post 842µs diff 61.1µs
> align 134217728 pre 996µs on 968µs post 836µs diff 52µs
> align 67108864 pre 811µs on 839µs post 757µs diff 55µs
> align 33554432 pre 871µs on 908µs post 847µs diff 48.7µs
> align 16777216 pre 854µs on 914µs post 818µs diff 78µs
> align 8388608 pre 851µs on 908µs post 850µs diff 58.2µs
> align 4194304 pre 892µs on 880µs post 908µs diff -20511n
> align 2097152 pre 828µs on 849µs post 885µs diff -7708ns
> align 1048576 pre 874µs on 886µs post 862µs diff 17.9µs
> align 524288 pre 852µs on 869µs post 915µs diff -15025n
> align 262144 pre 844µs on 895µs post 940µs diff 2.73µs
> align 131072 pre 848µs on 884µs post 907µs diff 6.1µs
> align 65536 pre 837µs on 857µs post 840µs diff 18µs
> align 32768 pre 831µs on 864µs post 861µs diff 17.7µs
> align 16384 pre 855µs on 841µs post 826µs diff 201ns
>
> Could it be some linux cache is in the way?
No, all I/O is done with O_DIRECT, which completely bypasses the
page cache. In theory, there could be a cache on the stick, but
that's rarely the case. The USB protocol adds some jitter here,
and for some reason you cannot use real-time scheduling, which makes
the results less accurate.
> > Another helpful indication would be the output of 'fdisk -lu
> > /dev/sde': It will show the start of the partition and the size of
> > the drive, both should be a multiple of the erase block size.
>
> # fdisk -lu /dev/sde
>
> Disk /dev/sde: 16.2 GB, 16240345088 bytes
> 255 heads, 63 sectors/track, 1974 cylinders, total 31719424 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: 0x925df597
Ok, 16240345088 bytes is 121 times 128 MiB, so it's certainly not using
4128 KiB blocks or some other strange unit.
> Device Boot Start End Blocks Id System
> /dev/sde1 63 31712309 15856123+ 7 HPFS/NTFS/exFAT
>
> I didn't use sde1 but sde for the tests, so it shouldn't have a meaning.
> I'll change the partition to start at 2048 or whatever I find the erasesize to be.
Be careful here. The original FAT layout is typically made specifically
for this stick, so it's probably a good idea to make a backup of the first
few blocks.
> > Finally, a third way is to look at a gnuplot chart on the output of
> >
> > flashbench -s -o output.plot /dev/sde --scatter-order=10
> > --scatter-span=2 --blocksize=8192 gnuplot -p -e 'plot "output.plot"'
> >
> > On many drives, the boundaries between erase blocks show up as spikes
> > in the chart.
>
> Phew, two lines, more or less, and spikes everwhere (see attached).
Right, nothing to see here yet. It only shows the first 8 MB, so if the
spike is every 8 MB, it won't show up here. Use --scatter-order=12 to show
more. Also, the jitter from the USB protocol may hide some details,
which might get better with a larger --count= value, but that would make
the test run much longer.
It's probably good enough to assume that the size is actually 8 MB
or 4 MB, and keep going from there.
> > Also, please post the USB ID and name output from 'lsusb' for
> > reference.
>
> # lsusb -v
> Bus 001 Device 005: ID 1b1c:1a90
Ok.
> Now with 16 I got it slower, still no visible border:
>
> # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[64 * 1024] /dev/sde --open-au-nr=4
> sched_setscheduler: Operation not permitted
> 4MiB 7.3M/s
> 2MiB 11.2M/s
> 1MiB 15.7M/s
> 512KiB 19.2M/s
> 256KiB 14.5M/s
> 128KiB 12.8M/s
> 64KiB 18.8M/s
> # ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[64 * 1024] /dev/sde --open-au-nr=16
> sched_setscheduler: Operation not permitted
> 4MiB 9.77M/s
> 2MiB 3.41M/s
> 1MiB 7.38M/s
> 512KiB 5.69M/s
> ^C (took too long)
If it takes too long, that's a good indication that something interesting is happening ;-)
> Seems that stick wants to hide it's internals?
Not completely unusual, but somewhat harder than most.
I've committed some updates now that might help make the --open-au results a bit clearer,
and faster.
What I would recommend now is to update to the latest git version (just
uploaded), and then try increasing numbers of --open-au-nr= with 4 MB
erasesize, until you hit the cutoff. Try the same with --random, for the
last fast one and the first slow one:
./flashbench -O --erasesize=$[4 * 1024 * 1024] /dev/sde --open-au-nr=5
./flashbench -O --erasesize=$[4 * 1024 * 1024] /dev/sde --open-au-nr=6
./flashbench -O --erasesize=$[4 * 1024 * 1024] /dev/sde --open-au-nr=7
...
./flashbench -O --erasesize=$[4 * 1024 * 1024] /dev/sde --open-au-nr=N
=> N is the number of 4 MB blocks that can not be handled
./flashbench -O --erasesize=$[4 * 1024 * 1024] /dev/sde --open-au-nr=(N-1) --random
./flashbench -O --erasesize=$[4 * 1024 * 1024] /dev/sde --open-au-nr=N --random
=> Verify that the (N-1) --random case is still fast
./flashbench -O --erasesize=$[8 * 1024 * 1024] /dev/sde --open-au-nr=((N-1)/2) --random
./flashbench -O --erasesize=$[8 * 1024 * 1024] /dev/sde --open-au-nr=(N-1) --random
./flashbench -O --erasesize=$[8 * 1024 * 1024] /dev/sde --open-au-nr=(N-1) --random
Arnd
Dear Product Manager
From google, we get to know that you focus on communication pruducts with high reputation.We are professional IP-PBX,GSM gateway manufacturer with high-quality and competitive price.
MyPBX STD V4 is the newest version that supports PSTN,GSM,VoIP trunks with FXS / FXO / PRI / BRI (ISDN) ports. It is embedded hybrid IP-PBX which caters for the small businesses.
Please feel free to contact me to get further information to open our cooperation relationship in 2011.
Thanks&Best Regards
Alex
Yeastar Technology Co.,Ltd
Web: www.yeastar.com
MSN: hqy(a)yeastar.com
Skype: Yeastar.hqy
Tel: +86 592 5503309 Ext.8026
Add: 202,No.23 Wanghai Road, 2nd Software Park, Xiamen, China
--------------------------------------------------------------------------------
Dear Sir & Madam,
Have a nice day !
This is Sam Peng from BSI (BEST SERVICES INT'L FREIGHT LTD) in China.we are as
agent of Lufthansa Cargo / LH ; Lan Chile / LAN ; Bringer Air Cargo / E6 in China.
We specialize in Air freight / Sea shipping to Brazil in China.
It's my pleasure to send the the below air price for your reference.
Shenzhen / Guangzhou / Dongguan ; China to San Paulo ; Brazil :
1) A/Freight : USD7.10/KG (more than 1000kgs)
2) Frequency : Fri
3) Airways : Emirates Skycargo Airlines / EK
4) Transit Time: 3~4days
5) Departure : from HongKong
6) Flight Route : HongKong--Dubai--San Paulo
***we can help you to pick up the goods from any city in China to Brazil***
Our Promise:
-- Closely keep in touch with you & Supplier.
-- Keep working with you in the same time as you to know all update
information for your order in time.
-- Combine the shipment from different supplier and make the combine
packing list & commercial invoice to one set original document
-- Assist you to check new supplier's company credit.
-- Ensure Cargo to be loaded at the soonest.
-- Ensure to provide best logsitics project to save your purchase cost.
-- Keep update the cargo tracking information for you.
Our Certifications:
-- IATA: International Air Transport Association.
-- NVOCC: Non Vessel Operating Common Carrier.
-- WCA: Member of World Cargo Alliance.
-- CATA: China Civil Air Transport Sales (Class A) Agency Services.
I expect you to try our services for your air cargo to Brazil. I'm sure that our
sincerely services can make you feel satisfied.Please don't hesitate to contact
with me in any time.
B. regards!
Sam Peng
Sales Dept
BEST SERVICES INTERNATIONAL FREIGHT LTD
Rm.B13-19, 10/F, Regalia Place, Jiabin Rd, Shenzhen, China.
Tel : 86-755-25904212
Fax : 86-755-25901937 / 25901911
Cell Phone : +86-13760303532
E-mail : sales4.szx(a)bsigroup.cc
MSN : sampeng8210(a)hotmail.com
Skype : sampeng821007
Website: http://www.bestservices.com.cn
IATA: 08-3 1624 CATA: ZN30165 FMC: 022856 NVOCC: MOC-NV03395
BSI Offices : Shenzhen, HongKong, Guangzhou, Shanghai, Ningbo, Xiamen,
Dongguan, Zhongshan, Jiangmen.
BSI representative offices : Qingdao, Dalian, Tianjin, Beijing, Lianyungang,
Yantai, Fuzhou, Zhuhai, Shantou, Chongqing, Chengdu and others.
All transactions are subject to the Company's Standard Trading Conditions
( copy is available upon request ), which in certain circumstances limit or
exempt the Company's liability.
I can't interpret the numbers for the AUs, can you help me?
# ./flashbench -a /dev/sde --blocksize=1024
sched_setscheduler: Operation not permitted
align 536870912 pre 745µs on 756µs post 696µs diff 36.2µs
align 268435456 pre 698µs on 882µs post 670µs diff 198µs
align 134217728 pre 722µs on 899µs post 715µs diff 180µs
align 67108864 pre 720µs on 712µs post 669µs diff 17.1µs
align 33554432 pre 750µs on 765µs post 639µs diff 70.1µs
align 16777216 pre 727µs on 777µs post 684µs diff 71.8µs
align 8388608 pre 691µs on 727µs post 646µs diff 58.3µs
align 4194304 pre 689µs on 769µs post 675µs diff 87.3µs
align 2097152 pre 697µs on 879µs post 715µs diff 173µs
align 1048576 pre 716µs on 899µs post 789µs diff 147µs
align 524288 pre 659µs on 775µs post 724µs diff 83.4µs
align 262144 pre 657µs on 735µs post 685µs diff 63.6µs
align 131072 pre 656µs on 706µs post 756µs diff -248ns
align 65536 pre 655µs on 715µs post 650µs diff 62.3µs
align 32768 pre 732µs on 792µs post 743µs diff 54.1µs
align 16384 pre 685µs on 808µs post 767µs diff 82.6µs
align 8192 pre 732µs on 764µs post 697µs diff 49.8µs
align 4096 pre 661µs on 692µs post 681µs diff 20.7µs
align 2048 pre 671µs on 657µs post 653µs diff -5465ns
# ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=2
sched_setscheduler: Operation not permitted
4MiB 6.69M/s
2MiB 11.1M/s
1MiB 13.2M/s
512KiB 14.4M/s
256KiB 14.6M/s
# ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=3
sched_setscheduler: Operation not permitted
4MiB 6.68M/s
2MiB 11.2M/s
1MiB 12.9M/s
512KiB 14.5M/s
256KiB 14.8M/s
# ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=4
sched_setscheduler: Operation not permitted
4MiB 6.8M/s
2MiB 10.9M/s
1MiB 13M/s
512KiB 14.4M/s
256KiB 14.6M/s
# ./flashbench -O --erasesize=$[4 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sde --open-au-nr=6
sched_setscheduler: Operation not permitted
4MiB 7.45M/s
2MiB 9.24M/s
1MiB 16.4M/s
512KiB 17.4M/s
256KiB 7.98M/s
--
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc
it-management Internet Services: Protéger
http://proteger.at [gesprochen: Prot-e-schee]
Tel: +43 660 / 415 6531
// ****** Radiointerview zum Thema Spam ******
// http://www.it-podcast.at/archiv.html#podcast-100716
//
// Haus zu verkaufen: http://zmi.at/langegg/
Dear Sir or Madam,
Glad to hear that you're on the market for mobile phone. We, Wei Wan
Technology are a professional manufacturer for mobile phone.
Dual Sim card and Triple Sim card etc
Please contact me if any questions.
Sincerely hope to find a way to cooperate with your esteemed company!
Thanks & best regards
Juce
E-mail: elink(a)vip.188.com
Factory Address: 5/F, Building 21, ChenTian Industrial Park, BaoTian 2nd
Road, Xixiang Town, Bao'anDistrict, Shenzhen, GuangDong Province, China
root@netboot:~# (cd /sys/block/mmcblk0/device/ ; for i in * ; do if [ -f
$i ] ; then echo -n "$i: " ; cat $i ; fi ; done)
cid: 02544d534431364760dcbf359a00a800
csd: 400e00325b590000777f7f800a400000
date: 08/2010
fwrev: 0x0
hwrev: 0x6
manfid: 0x000002
name: SD16G
oemid: 0x544d
scr: 02b5800026027102
serial: 0xdcbf359a
type: SD
uevent: DRIVER=mmcblk
MMC_TYPE=SD
MMC_NAME=SD16G
MODALIAS=mmc:block
root@netboot:~# ~/flashbench/flashbench -a /dev/mmcblk0 --blocksize=1024
align 536870912 pre 838µs on 1.12ms post 960µs diff 222µs
align 268435456 pre 859µs on 1.09ms post 955µs diff 186µs
align 134217728 pre 860µs on 1.1ms post 957µs diff 196µs
align 67108864 pre 861µs on 1.11ms post 957µs diff 203µs
align 33554432 pre 860µs on 1.11ms post 960µs diff 197µs
align 16777216 pre 861µs on 1.11ms post 953µs diff 203µs
align 8388608 pre 859µs on 1.11ms post 961µs diff 198µs
align 4194304 pre 863µs on 1.1ms post 925µs diff 211µs
align 2097152 pre 862µs on 1.11ms post 965µs diff 199µs
align 1048576 pre 954µs on 978µs post 970µs diff 15.8µs
align 524288 pre 951µs on 977µs post 973µs diff 14.8µs
align 262144 pre 947µs on 977µs post 967µs diff 19.8µs
align 131072 pre 947µs on 983µs post 969µs diff 25.5µs
align 65536 pre 951µs on 981µs post 956µs diff 26.9µs
align 32768 pre 948µs on 977µs post 963µs diff 21.6µs
align 16384 pre 950µs on 978µs post 950µs diff 27.7µs
align 8192 pre 963µs on 960µs post 963µs diff -3106ns
align 4096 pre 962µs on 969µs post 956µs diff 10.1µs
align 2048 pre 963µs on 953µs post 951µs diff -3893ns
>From which I guess 2M erase block size. Not sure how to interpret the
last 4 rows.
Only 1 open allocation unit by the look of the following :-(
root@netboot:~# ~/flashbench/flashbench --open-au --open-au-nr=1
--erasesize=$[2 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/mmcblk0
2MiB 3.68M/s
1MiB 3.16M/s
512KiB 3.06M/s
256KiB 3.33M/s
root@netboot:~# ~/flashbench/flashbench --open-au --open-au-nr=2
--erasesize=$[2 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/mmcblk0
2MiB 3.09M/s
1MiB 2.01M/s
512KiB 1.43M/s
256KiB 618K/s
root@netboot:~# ~/flashbench/flashbench -f /dev/mmcblk04MiB 2.51M/s
2.46M/s 3.73M/s 3.72M/s 3.72M/s 3.72M/s
2MiB 3.7M/s 2.46M/s 3.73M/s 3.73M/s 3.72M/s 3.72M/s
1MiB 3.7M/s 2.46M/s 3.73M/s 3.74M/s 3.72M/s 3.72M/s
512KiB 3.7M/s 2.45M/s 3.72M/s 3.7M/s 3.73M/s 3.73M/s
256KiB 3.71M/s 2.63M/s 3.72M/s 3.73M/s 3.72M/s 3.72M/s
128KiB 3.71M/s 2.82M/s 3.73M/s 3.72M/s 3.72M/s 3.72M/s
64KiB 3.71M/s 3.01M/s 3.72M/s 3.72M/s 3.72M/s 3.72M/s
32KiB 3.58M/s 2.73M/s 3.57M/s 3.57M/s 3.58M/s 3.57M/s
16KiB 2.95M/s 2.25M/s 2.94M/s 2.95M/s 2.94M/s 2.95M/s
The --scatter-order=<n> --scatter-span=<m> arguments are not really
documented, so I didn't know how I should be using them, so I didn't.
There are some strange outliers on the plot, most of which seem to end
up consistently in the same place.
This card has had an HD image file copied over it (with dd) prior to any
of these results being generated.
On Friday 18 March 2011 18:45:34 Justin Piszcz wrote:
> On Fri, 18 Mar 2011, Arnd Bergmann wrote:
> > Getting back to the rogiinal question, I'd recommend testing the
> > stick by doing raw accesses instead of a file system. A simple
>
> Ok, here are the results:
>
> root@sysresccd /root % time dd if=/dev/zero of=/dev/sda oflag=direct bs=4M
> dd: writing `/dev/sda': No space left on device
> 1961+0 records in
> 1960+0 records out
> 8220835840 bytes (8.2 GB) copied, 283.744 s, 29.0 MB/s
Ok, so no immediate problem there.
> > I'm also interested in results from flashbench
> > (git://git.linaro.org/people/arnd/flashbench.git, e.g. like
> > http://lists.linaro.org/pipermail/flashbench-results/2011-March/000039.html)
> > That might help explain how the stick failed.
>
> Certainly, testing below, following this:
> http://lists.linaro.org/pipermail/flashbench-results/2011-March/000039.html
I'm sorry, I should have been more specific. Unfortunately, running flashbench
is not very user friendly yet.
The results indicate that the device does not have a 2 MB erase block size
but rather 4 or 8, which is more common on 8 GB media.
> # ./flashbench --open-au --open-au-nr=1 /dev/sda --blocksize=8192 --erasesize=$[2* 1024 * 1024] --random
> 2MiB 29.5M/s
> 1MiB 29.1M/s
> 512KiB 28.5M/s
> 256KiB 22.8M/s
> 128KiB 23.8M/s
> 64KiB 24.4M/s
> 32KiB 18.9M/s
> 16KiB 13.1M/s
> 8KiB 8.22M/s
>
> # ./flashbench --open-au --open-au-nr=4 /dev/sda --blocksize=8192 --erasesize=$[2* 1024 * 1024] --random
> 2MiB 25.9M/s
> 1MiB 21.8M/s
> 512KiB 15M/s
> 256KiB 11.9M/s
> 128KiB 12.1M/s
> 64KiB 13.6M/s
> 32KiB 9.81M/s
> 16KiB 6.41M/s
> 8KiB 3.88M/s
The numbers are jumping around a bit with the incorrectly guessed erasesize.
These values should be more like the ones in the first test. Can you rerun
with --erasesize=$[4 * 1024 * 1024]?
Also, what is the output of 'lsusb' for this stick? I'd like to add the
data to https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashCar…
> # ./flashbench --open-au --open-au-nr=5 /dev/sda --blocksize=8192 --erasesize=$[2* 1024 * 1024] --random
> 2MiB 29.2M/s
> 1MiB 27.8M/s
> 512KiB 18.4M/s
> 256KiB 7.82M/s
> 128KiB 4.62M/s
> 64KiB 2.47M/s
> 32KiB 1.26M/s
> 16KiB 642K/s
> 8KiB 327K/s
This is where your drive stops coping with the accesses: Writing small
blocks to four different erase blocks (2MB for the test, probably
larger) works fine, but writing to five of them is devestating for
performance, going from 30 MB/s to 300 KB/s, or lower if you were
to write smaller than 8 KB blocks.
The cutoff at --open-au-nr=4 is coincidentally the same as for the
SD card I was testing. This is what happens in the animation in
http://lwn.net/Articles/428799/. The example given there is for
a drive that can only have two open AUs (allocation units aka
erase blocks), while yours does 4.
> (did not run one with 7)
Note that the test results I had with 6 and 7 are without --random,
so the cut-off there was higher for that card when writing an
multiple erase blocks from start to finish instead of writing random
sectors inside of them.
> # ./flashbench --findfat --fat-nr=10 /dev/sda --blocksize=1024 --erasesize=$[2* 1024 * 1024] --random
> 2MiB 22.7M/s 19.1M/s 15.5M/s 13.1M/s 29.5M/s 29.5M/s 29.6M/s 29.6M/s 29.5M/s 29.5M/s
> 1MiB 20.6M/s 13.3M/s 13.3M/s 20.8M/s 18.1M/s 17.8M/s 18M/s 18.3M/s 18.8M/s 18.6M/s
> 512KiB 18.4M/s 18.6M/s 18.3M/s 18.1M/s 23.5M/s 23.2M/s 23.5M/s 23.5M/s 23.4M/s 23.4M/s
> 256KiB 26.9M/s 21.3M/s 21.2M/s 21M/s 21.1M/s 21.2M/s 21.1M/s 21.1M/s 20.6M/s 21M/s
> 128KiB 22.2M/s 22.3M/s 22.6M/s 21.4M/s 21.5M/s 21.3M/s 21.6M/s 21.3M/s 21.4M/s 21.4M/s
> 64KiB 23.9M/s 22.6M/s 22.9M/s 23M/s 22.5M/s 22.4M/s 22.4M/s 22.4M/s 22.5M/s 22.4M/s
> 32KiB 18.2M/s 18.3M/s 18.3M/s 18.3M/s 18.3M/s 18.4M/s 18.3M/s 18.2M/s 18.3M/s 18.3M/s
> 16KiB 12.9M/s 12.9M/s 13M/s 13M/s 12.9M/s 13M/s 12.9M/s 12.9M/s 12.9M/s 12.9M/s
> 8KiB 8.14M/s 8.15M/s 8.15M/s 8.15M/s 8.15M/s 8.14M/s 8.14M/s 8.15M/s 8.15M/s 8.06M/s
> 4KiB 4.07M/s 4.08M/s 4.07M/s 4.06M/s 4.04M/s 4.04M/s 4.04M/s 4.04M/s 4.04M/s 4.04M/s
> 2KiB 2.02M/s 2.02M/s 2.02M/s 2.02M/s 2.02M/s 2.01M/s 2.01M/s 2.01M/s 2.01M/s 2.02M/s
> 1KiB 956K/s 954K/s 956K/s 953K/s 947K/s 947K/s 947K/s 950K/s 947K/s 948K/s
>
One thing that is very clear from this is that this stick has a page size
of 8KB, and that it requires at least 64 KB transfers for the maximum speed.
If your partition is not aligned to 8 KB or more (better: to the erase
block size, e.g. 4 MB) or if the file system writes smaller than 8 KB
naturally aligned blocks at once, the drive has to do read-modify-write
cycles that severely impact performance and the expected life-time.
I cannot see any block that is optimzied for storing the FAT, which is
good, as this means that the manufacturer did not exclusively design
the stick for FAT32, as is normally the case with flash memory cards.
For this stick, I would strongly recommend creating the file system
in a way that writes at least 16 KB naturally aligned blocks at all
times, but I don't know if that's supported by XFS.
Also, the limitation of forcing a garbage collection when writing to
more than four 4 MB (or so) segments may be a problem, depending on
how XFS stores its metadata. The good news is that it can do random
write access inside of the erase blocks.
Arnd
Hello Arnd,
Here are the hdparm and smartctl outputs for the first card I tested
(Transcend ultra 2GB Industrial 'CF100BA8'). There seems to be no dma
mode there, only PIO.
Philippe
tmp179:~ # cat /proc/partitions
major minor #blocks name
8 0 244198584 sda
8 1 2103296 sda1
8 2 20972544 sda2
8 16 1990296 sdb
tmp179:~ # hdparm -i /dev/sdb
/dev/sdb:
Model=PIO, FwRev=20100202, SerialNo=20100716 CF100BA8
Config={ HardSect NotMFM Fixed DTR>10Mbs }
RawCHS=3949/16/63, TrkSize=0, SectSize=576, ECCbytes=4
BuffType=DualPort, BuffSize=1kB, MaxMultSect=1, MultSect=off
CurCHS=3949/16/63, CurSects=3980592, LBA=yes, LBAsects=3980592
IORDY=no, tPIO={min:120,w/IORDY:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
AdvancedPM=yes: disabled (255)
Drive conforms to: Unspecified: ATA/ATAPI-4
* signifies the current active mode
tmp179:~ # hdparm -I /dev/sdb
/dev/sdb:
CompactFlash ATA device
Model Number: PIO
Serial Number: 20100716 CF100BA8
Firmware Revision: 20100202
Standards:
Supported: 4
Likely used: 6
Configuration:
Logical max current
cylinders 3949 3949
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 3980592
LBA user addressable sectors: 3980592
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 1943 MBytes
device size with M = 1000*1000: 2038 MBytes (2 GB)
cache/buffer size = 1 KBytes (type=DualPort)
Capabilities:
LBA, IORDY(may be)(cannot be disabled)
Standby timer values: spec'd by Vendor
R/W multiple sector transfer: Max = 1 Current = 0
Advanced power management level: disabled
DMA: not supported
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
Power Management feature set
WRITE_BUFFER command
READ_BUFFER command
NOP cmd
CFA feature set
Advanced Power Management feature set
* Gen1 signaling speed (1.5Gb/s)
* CFA Power Level 1 (max 500mA)
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
2min for SECURITY ERASE UNIT.
Integrity word not set (found 0x0000, expected 0x52a5)
tmp179:~ # smartctl --all -T permissive /dev/sdb
smartctl 5.40 2010-10-16 r3189 [i686-pc-linux-gnu] (SUSE RPM)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: PIO
Serial Number: 20100716 CF100BA8
Firmware Version: 20100202
User Capacity: 2,038,063,104 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 4
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Mar 18 11:35:28 2011 CET
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
Checking to be sure by trying SMART RETURN STATUS command.
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x26) Offline data collection activity
is in a Reserved state.
Auto Offline Data Collection: Disabled.
Total time to complete Offline
data collection: ( 3) seconds.
Offline data collection
capabilities: (0x00) Offline data collection not supported.
SMART capabilities: (0x0002) Does not save SMART data before
entering power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x00) Error logging NOT supported.
No General Purpose Logging support.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x0000 100 100 000 Old_age Offline - 0
2 Throughput_Performance 0x0000 100 100 000 Old_age Offline - 0
5 Reallocated_Sector_Ct 0x0000 100 100 000 Old_age Offline - 0
7 Seek_Error_Rate 0x0000 100 100 000 Old_age Offline - 0
8 Seek_Time_Performance 0x0000 100 100 000 Old_age Offline - 0
12 Power_Cycle_Count 0x0000 100 100 000 Old_age Offline - 43
195 Hardware_ECC_Recovered 0x0000 100 100 000 Old_age Offline - 0
196 Reallocated_Event_Count 0x0000 100 100 000 Old_age Offline - 0
197 Current_Pending_Sector 0x0000 100 100 000 Old_age Offline - 0
198 Offline_Uncorrectable 0x0000 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0000 100 100 000 Old_age Offline - 0
200 Multi_Zone_Error_Rate 0x0000 100 100 000 Old_age Offline - 0
Warning: device does not support Error Logging
Error SMART Error Log Read failed: Input/output error
Smartctl: SMART Error Log Read Failed
Warning: device does not support Self Test Logging
Error SMART Error Self-Test Log Read failed: Input/output error
Smartctl: SMART Self Test Log Read Failed
Device does not support Selective Self Tests/Logging
tmp179:~ #
--
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
On Saturday 05 March 2011 00:55:29 Philippe De Muyter wrote:
> I have read with interest your article in lwn, and decided to try your flashbench
> program to discover the characteristics of the CF card we use.
>
> Unfortunately,
>
> ./flashbench -a -b 1K /dev/sdb
>
> fails with endless :
>
> time_read: Invalid argument
>
> Looking with strace, I get e.g.:
>
> pread64(3, 0xb3728000, 1, 1023410175) = -1 EINVAL (Invalid argument)
>
> Is that a behavior you can explain (and fix) ?
Yes, there are two known problems that I need to fix:
1. flashbench uses O_DIRECT for talking to the device, which means that
all accesses must be on multiples of full sectors based on the
underlying device sector size. It should detect this
2. command line arguments currently need to be natural numbers. There
is no parser for interpreting arguments like 1K or 4M as kilobytes and
megabytes.
It should work when you do
./flashbench -a -b 1024 /dev/sdb
Arnd
On Sunday 13 March 2011, Dirk Behme wrote:
> Hi Arnd,
>
> reading the flashbench README [1] what I really like is the
> explanation of the -a and the -O option. Explaining the options in
> this README, giving the examples and how to interpret the resulting
> figures really does help.
>
> Somehow I miss something similar for the -s and -f options. I.e. how
> to select the proper values for --scatter-order and --scatter-span and
> how to interpret the output of -s and -f.
>
> Once I understood it, I would be able to send a patch for the README ;)
>
> Additionally, it would be nice to give the flashbench options used for
> the graphs [2] [3] in the LWN article. The LWN article explains quite
> nicely how to interpret the given graphs, but it's not mentioned which
> flashbench options were used to get these graphs.
>
> Many thanks for your help and best regards
>
> Dirk
>
> [1]
> http://git.linaro.org/gitweb?p=people/arnd/flashbench.git;a=blob;f=README;h…
>
Sorry for the late reply. I promise I'll get to it and update the
README.
I should actually remove --scatter-order, it's too difficult to
understand this. It specifies the log2 of the number of blocks
in terms of --blocksize to be tested at the start of the medium.
The output file can be interpreted by
gnuplot -p -e 'plot "output.file"'
or by importing it into a spreadsheet program like oocalc and
using the XY chart function on two columns.
For --findfat, the output shows how each of the first N erase blocks
on the drive reacts to certain access patterns within the erase
block. Most drives do something different for a few blocks in the
beginning to optimize storing the FAT on them. Each column is one
erase block here. If they are all the same, the card does not have
an optimzied FAT area.
Arnd
On Friday 04 March 2011 20:16:05 Xianghua Xiao wrote:
> From the data below it appears APACER has a 1MB erasing block instead
> of the typical 4MB?
Yes, and this is not surprising for an SLC card, although it is
the first one I have seen.
> Also from the following email(waiting for approval on the list, will
> forward to you soon), that looks like a 4MB erasing block but is
> slower than APACER.
Sorry, I need to find the place on the mailing list settings to allow
non-members to post, and approve the mails you already sent.
> Does open-au-nr with higher number mean the underlying filesystem esp
> ext4 will do better,
Yes
> does that imply multithread parallel writing to some extent?
No, it's not about threads, but about how the data is laid out.
ext4 will have to write data, metadata and journal data for
many accesses, but these three are normally in different locations
on the driver, so you need at least three open segments for the first
process that is writing data. If you have other processes that also
write to the drive, or one process writing to multiple files, you
will need more.
> open-au-nr means how many different segments you can use
> to write to in the same time(so you don't need wait for one segment)?
Yes. The apacer card evidently can write to three segments, but not
to six. Can you also try 4 and 5 segments? The interesting number
is the maximum.
For the unigen card, it looks like it does not handle random access
well, independent of the number of AUs. Best try again without --random.
> I probably will recommend APACER over UNIGEN, does that make sense?
Depends on the other measurements.
Arnd