expected write speed on microSD
Harald Koenig
koenig at tat.physik.uni-tuebingen.de
Fri Sep 19 16:13:23 CEST 2008
On Sep 19, Nicolas Chauvat wrote:
> Hi List,
>
> Sorry if this is a FAQ, but I searched the archives and the wiki for
> "site:lists.openmoko.org microsd write [speed|slow]" and got no
> answer.
no answer but another finding, though I got ~150 KBytes/sec copying
a 600K bash binary:
http://lists.openmoko.org/pipermail/devel/2008-August/000654.html
I first was interested in read performace which isn't really great either.
right now I don't have a uSD card installed so an immediate test/comparison
is not possible.
> Is write speed to the microSD card a known issue? What throughput do others
> usually get when writing to the SD card ? Any suggestion on the best
> tool/way to investigate what may going wrong ?
1st I'd try to benchmark raw read or write operations (reading from /dev/zero
or copying to /dev/null).
I'm using "dd_rescue" (sources from SUSE) for such simple tests, or a modified
version of "buffer" (double buffered I/O pipe) which I call "mybuffer" and gives
nice continous thoughput data every N bytes.
if you're interested I can mail you both binaries (and/or source)..
once these performace numbers are good, I'd try to test if there are impacts
by interleaved I/O operations with other devices (e.g. copying from internal flash to SD,
or vice versa).
some "raw" SD performace data with "mybuffer" (last column (5) is
bytes/sec for last block, column 4 is average overall throuput).
my sd port settings (this is the 512MB uSD shipped with FR):
grep . /sys/module/glamo_mci/parameters/*
/sys/module/glamo_mci/parameters/sd_drive:0
/sys/module/glamo_mci/parameters/sd_idleclk:0
/sys/module/glamo_mci/parameters/sd_max_clk:16666666
/sys/module/glamo_mci/parameters/sd_slow_ratio:8
read from SD while jffs2_gcd_mtd6 for internal flash is running
(jffs2_gcd_mtd6 stays at ~50+ % cpu usage in top here!)
root at om-gta02:~# mybuffer -S 1M -s 64k < /dev/mmcblk0p3 > /dev/null
1088 K 1.9179 1.9179 580899 546728
2112 K 3.7968 1.8789 569613 558093
3136 K 5.7071 1.9103 562680 548900
4160 K 7.6617 1.9546 555991 536461
5184 K 9.5761 1.9144 554342 547741
6208 K 11.4805 1.9044 553722 550602
7232 K 13.3530 1.8725 554599 559974
another run got even worse read performace (~250 kB/sec):
12352 K 7.0739 3.8899 1788054 269563
13376 K 11.5739 4.5000 1183444 233017
14400 K 15.8220 4.2482 931966 246830
15424 K 20.3439 4.5218 776360 231891
16448 K 24.8988 4.5550 676447 230205
17472 K 29.3889 4.4900 608779 233534
18496 K 33.5489 4.1600 564546 252061
19520 K 37.9789 4.4300 526304 236697
20544 K 42.4588 4.4800 495469 234059
and after jffs2_gcd_mtd6 is idle:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1210 39.4 0.0 0 0 ? SN 15:46 4:50 [jffs2_gcd_mtd6]
mybuffer -S 1M -s 64k < /dev/mmcblk0p3 > /dev/null
24640 K 6.8806 1.6300 3667028 643299
25664 K 8.4823 1.6017 3098197 654652
26688 K 10.0098 1.5275 2730168 686467
27712 K 11.5655 1.5557 2453593 674022
28736 K 13.1118 1.5462 2244217 678143
29760 K 14.6406 1.5288 2081488 685866
(here I got 3.2 Mbyte/sec start of August, now it's 650 kByte/sec :-(
write tests are more difficult due to buffering (without special tools,
but OTOH syncing might change performace again;)
you can see write buffering in ~20MB junks, but the
average again is ~500+ kBytes/sec (not good, but
far from your 5 kBytes/sec):
mybuffer -S 1M -s 64k < /dev/zero > /dev/mmcblk0p3
pos. abs. time time/blk average per block
sec sec bytes/sec bytes/sec
1088 K 0.0679 0.0679 16413205 15447723
2112 K 0.1123 0.0444 19259502 23609663
3136 K 0.1688 0.0565 19024977 18558867
4160 K 0.2131 0.0443 19986487 23646400
5184 K 0.2577 0.0445 20601366 23543929
6208 K 0.3063 0.0486 20755695 21573862
7232 K 0.3543 0.0480 20903563 21847153
8256 K 0.8926 0.5384 9470987 1947711
9280 K 1.4070 0.5144 6753743 2038468
10304 K 1.9511 0.5441 5407754 1927132
11328 K 2.2164 0.2653 5233671 3953146
12352 K 15.4809 13.2646 817033 79050
13376 K 16.7628 1.2819 817108 818011
14400 K 19.7256 2.9628 747535 353911
15424 K 22.7080 2.9823 695534 351594
16448 K 26.2732 3.5652 641062 294113
17472 K 29.3032 3.0300 610558 346060
18496 K 32.9872 3.6840 574158 284629
19520 K 33.5612 0.5740 595582 1826704
20544 K 33.7570 0.1958 623190 5356135
21568 K 33.9601 0.2031 650340 5163033
22592 K 34.3651 0.4050 673189 2589338
23616 K 34.7529 0.3878 695849 2703616
24640 K 35.0284 0.2755 720311 3805917
25664 K 35.4772 0.4488 740755 2336362
26688 K 35.8940 0.4168 761366 2515831
27712 K 36.0703 0.1762 786717 5949637
28736 K 49.5933 13.5231 593339 77539
29760 K 50.8114 1.2181 599751 860848
30784 K 53.8976 3.0862 584864 339759
31808 K 57.0753 3.1777 570673 329982
32832 K 59.9214 2.8461 561068 368431
33856 K 64.4026 4.4813 538309 233990
34880 K 69.9063 5.5037 510928 190523
35904 K 71.1596 1.2533 516665 836654
36928 K 71.5961 0.4365 528161 2402373
37952 K 72.1528 0.5568 538618 1883336
38976 K 72.5331 0.3803 550251 2757552
40000 K 73.3097 0.7766 558725 1350272
41024 K 73.9329 0.6233 568198 1682386
42048 K 74.4892 0.5562 578032 1885117
43072 K 75.0710 0.5818 587520 1802311
44096 K 75.4005 0.3295 598859 3181996
45120 K 75.8320 0.4315 609279 2430128
46144 K 76.2342 0.4022 619819 2607126
47168 K 77.0248 0.7907 627070 1326208
48192 K 77.5420 0.5171 636411 2027718
49216 K 91.7279 14.1859 549420 73916
50240 K 95.2785 3.5506 539951 295320
51264 K 100.3792 5.1007 522960 205574
52288 K 100.5580 0.1788 532457 5864125
53312 K 101.8943 1.3362 535766 784723
54336 K 104.1766 2.2824 534093 459423
55360 K 104.6852 0.5085 541515 2061905
56384 K 105.4677 0.7825 547440 1340082
57408 K 108.6780 3.2103 540917 326626
58432 K 113.8534 5.1754 525538 202605
59456 K 118.7442 4.8908 512723 214399
60480 K 122.0862 3.3420 507277 313758
61504 K 122.7146 0.6285 513224 1668458
62528 K 123.4243 0.7097 518768 1477516
63552 K 123.9439 0.5196 525053 2017947
64576 K 124.4311 0.4872 531425 2152390
65600 K 125.1805 0.7494 536620 1399170
66624 K 125.7024 0.5219 542733 2009112
67648 K 125.9322 0.2297 550070 4564960
68672 K 126.2853 0.3532 556835 2968805
69696 K 140.4959 14.2105 507977 73788
70720 K 146.8044 6.3085 493290 166215
71744 K 150.8974 4.0930 486859 256186
72768 K 150.9584 0.0610 493609 17201332
73792 K 151.0208 0.0624 500348 16807604
74816 K 151.0810 0.0603 507089 17394801
75840 K 151.1430 0.0619 513819 16934366
76864 K 151.2758 0.1329 520299 7891684
btw: this does not really change/improve performace:
echo 1 > /sys/module/glamo_mci/parameters/sd_idleclk
Harald
--
"I hope to die ___ _____
before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
\/\/\/\/\/\/\/\/\/
Harald Koenig // / \\ \
koenig at tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
More information about the community
mailing list