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