Hi all, I have an usb-storage device in my Computer hat can handle several memory-cards like CF, SD, MMC, MS and SM Cards.
I often read/write to my 1 gig SD card (USB 2.0). Reading is always fast (~ 5MB/s) using Kernel 2.6.12 or 2.6.13. But: Writing to the card is very very slow: < 40 kb/s. My kubuntu system mounts that kind of devices like that: /dev/sda1 on /media/sda1 type vfat (rw,noexec,nosuid,nodev,sync,quiet,uid=1000,gid=1000,umask=077,iocharset=utf8) Now I discovered that if I do a "mount -o remount,async /meda/sda1", the writing speed increases to a normal value of about 5 megs/s. I remember, that the problem did not exist with earlier kernels (and this version of kubuntu) I think this might be a kernel bug introduced by some patch applied before 2.6.12. -------------------------------------------------------------------- Demo (1GB SD-Card): I created a 10MB file and tested with that: mounted as shown above (with 'sync') [EMAIL PROTECTED]:~ # dd if=/dev/zero of=./big_file bs=1M count=10 10+0 records in 10+0 records out 10485760 bytes transferred in 0.032557 seconds (322073583 bytes/sec) [EMAIL PROTECTED]:~ # time cp big_file /media/sda1 real 4m30.353s user 0m0.000s sys 0m0.392s [EMAIL PROTECTED]:~ # [EMAIL PROTECTED]:~ # mount /media/sda1 -o remount,async [EMAIL PROTECTED]:~ # dd if=/dev/zero of=./big_file2 bs=1M count=10 10+0 records in 10+0 records out 10485760 bytes transferred in 0.032355 seconds (324085870 bytes/sec) [EMAIL PROTECTED]:~ # time { cp big_file2 /media/sda1; sync; } real 0m2.048s user 0m0.000s sys 0m0.108s [EMAIL PROTECTED]:~ # (38 kb/s vs. 5 MB/s !!) -------------------------------------------------------------------- Demo 2 (1GB CF-Card) Using a CF-Card, the problem is still there, but the difference is not that big: [EMAIL PROTECTED]:~ # time cp big_file /media/sda1 real 0m18.770s user 0m0.000s sys 0m0.136s [EMAIL PROTECTED]:~ # mount /media/sda1 -o remount,async [EMAIL PROTECTED]:~ # time { cp big_file2 /media/sda1; sync; } real 0m5.970s user 0m0.000s sys 0m0.088s [EMAIL PROTECTED]:~ # (548 kb/s vs. 1715 kb/s) -------------------------------------------------------------------- Here some more detailed informartion about my setup: Kernel: vanilla 2.6.13 USB modules: hci_usb 12680 6 usbhid 34848 0 usb_storage 76608 1 usbcore 127996 6 ehci_hcd 35016 0 uhci_hcd 34640 0 USB Devices shown by lspci -v: 0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Asustek Computer, Inc. A7V600 motherboard Flags: bus master, medium devsel, latency 64, IRQ 20 I/O ports at cc00 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Asustek Computer, Inc. A7V600 motherboard Flags: bus master, medium devsel, latency 64, IRQ 20 I/O ports at dc00 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Asustek Computer, Inc. A7V600 motherboard Flags: bus master, medium devsel, latency 64, IRQ 20 I/O ports at ec00 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI]) Subsystem: Asustek Computer, Inc. A7V600 motherboard Flags: bus master, medium devsel, latency 64, IRQ 20 I/O ports at b000 [size=32] Capabilities: [80] Power Management version 2 0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) (prog-if 20 [EHCI]) Subsystem: Asustek Computer, Inc. A7V600 motherboard Flags: bus master, medium devsel, latency 64, IRQ 20 Memory at fda00000 (32-bit, non-prefetchable) [size=256] Capabilities: [80] Power Management version 2 Any hints anybody? Did I miss some important information? Thanks in advance for helping. -Marc -- BUGS My programs never have bugs. They just develop random features. If you discover such a feature and you want it to be removed: please send an email to bug at links2linux.de
signature.asc
Description: Digital signature