Re: FC5: High system load when copying data to slow USB media

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phil Meyer wrote:
Boris Glawe wrote:
Hi,

I have a problem with my 2GB Memory Stick Pro Duo Card. The card itself is an orginal MemoryStick PRO Duo from Sony.

I am using this card in my cell phone. The phone is a Sony Ericsson W810i, which is capable to appear as an usb mass storage device. I also have an USB 2.0 card reader. The problem described below happens with both the card reader and the cell phone.
Are you certain that it is in fact a USB 2 card reader? You should be getting at least 5MB/sec transfer rates from that card, whether in the phone or on the reader.

Yes I am sure. It supports many different card types. With compactflash cards it runs extremely fast.

Here is simple benchmark: "file" is 50MB big:

# time { cp file /media/disk/; sync; }

real    0m30.390s
user    0m0.004s
sys     0m0.256s

This seems to be 1.6 MB/Sec, which is the speed of USB-1 devices. I am sure though, that it is a USB-2 device. According to a german wikipedia page (http://de.wikipedia.org/wiki/Memorystick), the actual tranfer rate isn't higher than 2MB/s for MS Pro Duo cards, though they are marked with 20MB/s.


Some USB busses have trouble with mixing USB 1 and USB 2 devices. Is there any other USB device connected to the system?

nope, no problems.

Some mother boards use the same USB bus for fron and rear connections. That means that a USB 1 device connected to the front, and interfere with a USB device plugged into the rear.

Lets say you have an old USB mouse plugged in. Maybe its old enough to be a USB 1 device. It is possible to have the symptoms you describe in this case. The USB 1 mouse will interfere with a USB 2 disk drive at the hardware layer. It will cause the entire USB bus to drop to USB 1 speeds.

In order to help prevent that, the USB 1.1 specification allows a slow device to advertise itself as a fast device. This does not always work.

# yum install usbutils
# lsusb

Is there more than one USB bus? Is the card reader or phone on a bus by itself?

Each device is connected to it's "own" bus:

# lsusb
Bus 002 Device 002: ID 046d:c506 Logitech, Inc. MX-700 Cordless Mouse Receiver
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 004: ID 058f:6362 Alcor Micro Corp.
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000



My problem is, that copying large amounts of data (a few hundred MBs, for example) to that device causes the system load to increase to almost 100% and, under certain circumstances, to lock my desktop from time to time during the copying process. It is normal that copying takes very long, as the card itself is very slow in writing, but the high system load in combination with the lack of responsiveness of the whole system seems to be a bug!?
This really sounds like a conflict.
It can be caused by an interrupt conflict, and/or a device conflict.
Plug the card in and:
# dmesg | tail -30
What do you see? Is the system quick to recognize the drive? Any errors?

Here's the output from "tail -f /var/log/messages" after I have plugged in the device:

Sep 19 20:23:19 machine kernel: usb 3-6: new high speed USB device using ehci_hcd a nd address 4 Sep 19 20:23:19 machine kernel: usb 3-6: configuration #1 chosen from 1 choice Sep 19 20:23:19 machine kernel: scsi3 : SCSI emulation for USB Mass Storage devices Sep 19 20:23:24 machine kernel: Vendor: Generic Model: USB SD Reader Rev: 1 .00 Sep 19 20:23:24 machine kernel: Type: Direct-Access ANSI S CSI revision: 00
Sep 19 20:23:24 machine kernel: sd 3:0:0:0: Attached scsi removable disk sdb
Sep 19 20:23:24 machine kernel: sd 3:0:0:0: Attached scsi generic sg1 type 0
Sep 19 20:23:24 machine kernel: Vendor: Generic Model: USB CF Reader Rev: 1 .01 Sep 19 20:23:24 machine kernel: Type: Direct-Access ANSI S CSI revision: 00
Sep 19 20:23:24 machine kernel: sd 3:0:0:1: Attached scsi removable disk sdc
Sep 19 20:23:24 machine kernel: sd 3:0:0:1: Attached scsi generic sg2 type 0
Sep 19 20:23:24 machine kernel: Vendor: Generic Model: USB SM Reader Rev: 1 .02 Sep 19 20:23:24 machine kernel: Type: Direct-Access ANSI S CSI revision: 00
Sep 19 20:23:24 machine kernel: sd 3:0:0:2: Attached scsi removable disk sdd
Sep 19 20:23:24 machine kernel: sd 3:0:0:2: Attached scsi generic sg3 type 0
Sep 19 20:23:24 machine kernel: Vendor: Generic Model: USB MS Reader Rev: 1 .03 Sep 19 20:23:24 machine kernel: Type: Direct-Access ANSI S CSI revision: 00
Sep 19 20:23:24 machine kernel: sd 3:0:0:3: Attached scsi removable disk sde
Sep 19 20:23:24 machine kernel: sd 3:0:0:3: Attached scsi generic sg4 type 0





It is true that the latest kernels in FC5 are having flush on unmount problems with removable media. The last working kernel was the last 2.6.16 kernel (2133). There are currently several USB related kernel bugs in the 2.6.17 kernels. Enough to cover the symptoms you see when you try to unmount. Many folks are seeing that.

However, if we can figure out what is happening in regards to your system thrashing during writes, the too slow flush at unmount will be eased a bit.

It is common practice for me to 'count to 10' now days before pulling out a memory card after a umount. I currently work with CF and SD cards nearly every day. I feel your pain.



If you say, that there are bugs around, I'm sure that this issue will be fixed soon.

In my case I have to count to 500, as I am copying hundreds of MBs :-)

Thanks for you hints!!

greets

Boris


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux