![]() |
Slow write speed on mmc? (2gb-mmcplus52Mhz)
Hi,
i've bought a N770 (plus 2GB Kingston mmcmobile card) a few days ago. My setup:
Now the startup of the device is much faster! But when i try to download larger files over wlan (with wget) the download starts with ca. 600KB/s and slowsdown to ca. 200KB/s and my CPU usage (xterm top) increases to ca. 100%. Then my system begins to hang sometimes. "Top" shows me that the service "mmcqd" is responsible to the high cpu usage! So it seems that the download slowsdown when chached writes are synced to the mmc. So I tested the read/write speed of my card. Code:
time dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=1024010240+0 records out real 0m 15.63s user 0m 0.02s sys 0m 2.25s Code:
time dd if=/dev/zero of=zero-file bs=1024 count=10240; time sync10240+0 records out real 0m 0.62s user 0m 0.03s sys 0m 0.57s real 0m 26.44s user 0m 0.00s sys 0m 0.01s Result:
Is that normal??? such a slow write speed? Can anyone confirm this? Greetings from Germany N770-Freak |
Noticed this too. Exactly same behaviour. Would be interesting to test it directly with raw device (will destroy data): time dd if=/dev/zero of=/dev/mmcblk0pX bs=1024 count=x. If this is considerably faster the linux file/buffer cache is probably the problem. If not, it can be something in mmc driver. Would be also interesting to test 2gb kernel without high-speed patches if it is same, but I guess it will be the same. There are no suspicious errors in kernel log (dmesg output) except ocassional unexpected interrupt or something similar so I guess the mmc driver works fine and there are no retries or timeouts while writing (caused by higher speed) that could slow it down.
|
N770-Freak's initial thread would seem to indicate that he/she is accessing and using the 2GB Kingston Mobile card in the 770 without first attaining support for the card by flashing zImage-su-18-200627. Did the flashing of zImage-su-a8-200625-2gb-mmcplus52Mhz to gain a higher MMC bus speed also somehow accomplish the attaining of access provided by the 200627?
|
Quote:
Quote:
Quote:
Code:
time dd if=/dev/zero of=/dev/mmcblk0p3 bs=1024 count=1024010240+0 records out real 0m 34.30s user 0m 0.02s sys 0m 0.88s 300KB/sec write speed Quote:
Code:
time dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=1024010240+0 records out real 0m 58.96s user 0m 0.03s sys 0m 2.21s 1400KB/sec read speed Code:
time dd if=/dev/zero of=outputf bs=1024 count=10240; time sync10240+0 records out real 0m 0.66s user 0m 0.03s sys 0m 0.54s real 0m 31.63s user 0m 0.00s sys 0m 0.03s 320KB/sec write speed Code:
time dd if=/dev/zero of=/dev/mmcblk0p3 bs=1024 count=1024010240+0 records out real 0m 39.58s user 0m 0.05s sys 0m 0.78s 260KB/sec write speed Btw. i rounded all the values. Hope that helps someone (perhaps fanoush ;)) to find the real source of the problem (and solves it). Greetings N770-Freak |
Hello. The problem seems to be that MMC supports so called multiblock read and write command but current kernel support only multiblock read but not write. There is a patch that enables writing too http://www.spinics.net/lists/arm-kernel/msg35748.html but there was a reason for disabling that. On some MMC controllers it can cause data corruption. Maybe OMAP inside N770 works fine (see also http://www.spinics.net/lists/arm-kernel/msg35999.html ) but it is definitely untested.
Anyone wants to try kernel with multiblock writes enabled ? You can find it here http://fanoush.webpark.cz/maemo/#mmcplus below the high-speed one. It works for me and write speed is ~2MB/s but it may bite you in the future (same as high speed mode) so don't try it if you like your data on MMC and use N770 for something mission critical. You can measure write speed like this sync ; date ; dd if=/dev/zero of=/path/to/mmc/test bs=8192 count=5000 ; sync ; date My test (system booted from MMC): Code:
Nokia770-26:~# sync ; date ; dd if=/dev/zero of=/test bs=8192 count=5000 ; sync ; date |
Oh, sorry it seems to be 30 seconds in the test above, I think I got 20 seconds yesterday.
|
Tanks for this patch!
I've flashed this new kernel a few minutes ago... Got 40MB in 34 secs => ca. 1100KB/sec Hope that my mmc controller can handle this without data corruption ;) Greetings... N770-Freak |
It probably depends a lot on the filesystem i.e. you need to have continuous free blocks to use the multiblock write with big gains. Bus some gain is constant. Basic MMC block is 512bytes and ext2 filesystem uses 1024 or bigger blocks so at least such blocks can be written at once.
|
Hi
Does this only become an issue if writing a lot of data? If you run the OS from the mmc card and don't have large file transfers, is the speed acceptable? Cheers Rich |
Well, most usage is just reading so yes, mostly it is acceptable and hard to notice.
Slow writes may hurt virtual memory performace (i.e. when swapping) and when downloading from fast network or moving data via USB. Both speeds (wlan and USB) are slightly higher that default MMC write speed. It probably doesn't matter at all when you write few kilobytes or even megabytes infrequently since there is some cache. Of course it depends on amount of free memory which is unfortunately permanently low on N770. Once there is no free memory for more data when writing continuously it slows down to crawl (i.e. 200-300KB/s) and system may become low on memory (and a bit ustable and slow) because all memory is occupied by data which needs to be written. |
off topic
Fanoush, does the 52mhz mmc kernel also contain the mppe patch?
Thanks, |
Quote:
http://www.internettablettalk.com/fo...3372#post23372 crypto code is in but pptp is in extra module. |
Mini-SD speed?
Hi
It's mentioned elsewhere about a new Nokia tablet, 870/880 in the works, and talks about mini-SD in the spec. If true, does Fanoush, anyone know if mini-SD offers the same performance as mmc? I also think mini-SD is closed source so presumably speed tweaks might be harder? Though maybe mini-SD is already runs at a high speed. Cheers Rich |
as for features there is nice table here
http://en.wikipedia.org/wiki/SD_card I am not sure SD or miniSD is best choice for future. It may be more widespread right now but the limits (both speed and size) are lower then MMCplus. SD is dead end and will be replaced by incompatible SDHC soon http://www.sdcard.org/sdhc/index.html http://www.sandisk.com/sdhc/SDHC.pdf Still miniSD is improvement over current mmc slot in N770. As for being open, SD is worse but not much, I hope the time when SD card kernel drivers were closed source (sharp zaurus) is over. We will see soon :-) I still don't understand why they did not chose full SD slot which is the best solution for consumers (cheapest cards, better interoperability) but being phone company miniSD was probably more logical and maybe a bit cheaper to them. |
diffs against nov 2006 2.6.16 kernel
fanosh,
Can I get you to post your diffs for the kernel source - particularly those against the just released 2.6.16-27-omap1? I'm interested to see how your patches in drivers/mmc/*.c and includes/linux/mmc/*.h square with mine. Thanks, -dacb |
I have used this patch for high-speed mode
http://marc.theaimsgroup.com/?l=linu...18628389&q=raw but replaced 'mmc_set_data_timeout(&data, card, 0);' call by older code from 2.6.16 as for omap and n770 specific parts I just bumped frequency to 48Mhz both in drivers/mmc/omap.c and arch/arm/mach-omap1/board-nokia770-mmc.c I will produce diff eventually, but I don't have both old and new source trees right now. |
OK, it looks like we are both back porting from patches applied to 2.6.18 - fwiw, I understand that the the high speed (sans omap-1 specific hardcodes) and the multi-block writes are in the pipeline for the main-line kernel in 2.6.20.
Thanks, look forward to seeing your diffs. |
Quote:
|
Outstanding, thanks!
|
| All times are GMT. The time now is 16:09. |
vBulletin® Version 3.8.8