Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

VERY slow USB flash drive write speed.. on 2 Gentoo systems

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
51 posts
  • Previous
  • 1
  • 2
  • 3
  • Next
Author
Message
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 3:51 am

I can only draw one conclusion after all these tests.. USB support is SHITTY under linux.. maybe the kernel is the fault? (or the user has no clue about how to configure the system, lol)
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 3:57 am

So guys.. whoever is reading this thread, PLEASE make some similar tests if you have a USB flash drive at home, and report your results.. I need to know if the problem is related to my configuration, or this problem is common to most of Linux (or only Gentoo) users?
Top
doctork
Guru
Guru
Posts: 370
Joined: Sun Apr 25, 2004 12:02 am
Location: Cleveland, OH

  • Quote

Post by doctork » Sun Sep 27, 2009 5:13 am

Using gkrellm, I find on my AMD Phenom with a 2.6.30-gentoo-r5 kernel, I find that with this flash drive

Code: Select all

Bus 003 Device 027: ID 0781:554f SanDisk Corp.
I get ~6 MByte/sec writes and ~25 MByte/sec reads.

With this flashdrive

Code: Select all

Bus 003 Device 026: ID 0204:6025 Chipsbank Microelectronics Co., Ltd CBM2080 Flash drive controller              
I get ~3 MByte/sec writes and ~15 MByte/sec reads.
--
doc
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sun Sep 27, 2009 6:52 am

So what happened if you unload uhci_hcd ?
Top
doctork
Guru
Guru
Posts: 370
Joined: Sun Apr 25, 2004 12:02 am
Location: Cleveland, OH

  • Quote

Post by doctork » Sun Sep 27, 2009 7:16 am

dmpogo wrote:So what happened if you unload uhci_hcd ?
If you're asking me, 1) I'm running an amd base board using ohci_hcd and ehci_hcd not uhci_hcd, 2) the flash drives are connected through ehci_hcd, and 3) I'm not about to turn off ohci_hcd because my UPS is connected to that. IMNHO, the original poster either has bad hardware or has screwed up his kernel configuration. I doubt that there's anything inherenly wrong with Linux USB support.
--
doc
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sun Sep 27, 2009 7:28 am

doctork wrote:
dmpogo wrote:So what happened if you unload uhci_hcd ?
If you're asking me, 1) I'm running an amd base board using ohci_hcd and ehci_hcd not uhci_hcd, 2) the flash drives are connected through ehci_hcd, and 3) I'm not about to turn off ohci_hcd because my UPS is connected to that. IMNHO, the original poster either has bad hardware or has screwed up his kernel configuration. I doubt that there's anything inherenly wrong with Linux USB support.
--
doc
No, I was asking the person who asked the original question and we discussed ehci/uhci issue on the previous page of comments
Top
mikkoc
Apprentice
Apprentice
Posts: 231
Joined: Thu May 24, 2007 9:07 am

  • Quote

Post by mikkoc » Sun Sep 27, 2009 8:52 am

I think this is the same as: https://bugs.launchpad.net/gvfs/+bug/19 ... mments=all
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 27, 2009 9:19 am

MarcusXP,

FLASH write speeds are limited by the FLASH chips used in the device.

You have clearly been moving things around between USB ports as your dmesg shows one arrangement of devices and your /proc/bus/usb/devices shows another. There is another speed limitation on USB storage - DMA cannot be used as USB does not support DMA.

Get usbview and use it to ensure your USB2 devices are all on EHCI ports and your USB1 devices are all on OHCI/UHCI ports.
Further, each root hub can only supply 500mA total for all connected devices. usbview will show you the power required by each device. Add them up and keep the total under 500mA.

Breaching any of these rules results in suboptimal USB performace.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Sep 27, 2009 9:39 am

MarcusXP wrote:So guys.. whoever is reading this thread, PLEASE make some similar tests if you have a USB flash drive at home, and report your results.. I need to know if the problem is related to my configuration, or this problem is common to most of Linux (or only Gentoo) users?
If all gentoo users are affected by it, you could expect to find in the forum the problem report many times. So it seems not (i didn't search, but i suppose you've done it before opening a new thread, don't you ?)

did you try to reproduce with gentoo livecd/dvd or with another distro (just to try with a kernel you didn't made)
Top
doctork
Guru
Guru
Posts: 370
Joined: Sun Apr 25, 2004 12:02 am
Location: Cleveland, OH

  • Quote

Post by doctork » Sun Sep 27, 2009 1:58 pm

NeddySeagoon wrote:MarcusXP,
[...]
Get usbview and use it to ensure your USB2 devices are all on EHCI ports and your USB1 devices are all on OHCI/UHCI ports.
Further, each root hub can only supply 500mA total for all connected devices. usbview will show you the power required by each device. Add them up and keep the total under 500mA.

Breaching any of these rules results in suboptimal USB performace.
On the system I'm currently messing with, the physical USB port I'm connected to does not determine whether EHCI or OHCI controls the device. For example, with a USB 2.0 flash drive connected, the relevant sections of /proc/bus/usb/devices reads:

Code: Select all

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=10
B:  Alloc=  0/800 us ( 0%), #Int=  4, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.30-gentoo-r6 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:13.5
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 31 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0781 ProdID=554f Rev= 2.00
S:  Manufacturer=Best Buy
S:  Product=Geek Squad
S:  SerialNumber=1101300EB9409EB1
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Now, if I remove the flash drive in insert a mouse receiver in the SAME PHYSICAL PORT, I see:

Code: Select all

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc= 41/900 us ( 5%), #Int=  2, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 2.06
S:  Manufacturer=Linux 2.6.30-gentoo-r6 ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=0000:00:13.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1
P:  Vendor=046d ProdID=c526 Rev= 5.00
S:  Manufacturer=Logitech
S:  Product=USB Receiver
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=82(I) Atr=03(Int.) MxPS=  20 Ivl=1ms
Magic beyond my meager knowledge of electronics and USB drivers, but that's how it works on this system.
--
doc
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 2:23 pm

krinn wrote:
MarcusXP wrote:So guys.. whoever is reading this thread, PLEASE make some similar tests if you have a USB flash drive at home, and report your results.. I need to know if the problem is related to my configuration, or this problem is common to most of Linux (or only Gentoo) users?
If all gentoo users are affected by it, you could expect to find in the forum the problem report many times. So it seems not (i didn't search, but i suppose you've done it before opening a new thread, don't you ?)

did you try to reproduce with gentoo livecd/dvd or with another distro (just to try with a kernel you didn't made)
I did find some similar posts but none seem to describe my exact problem.
This one that mikkoc found seems to describe the same issue, but the majority of users there are using Ubuntu:
https://bugs.launchpad.net/gvfs/+bug/19 ... mments=all

However, I have found this bug, which matches my problem pretty close:
http://bugs.gentoo.org/99039

They do not give an exact solution to the issue, they say "just change your fstab or the command you use to mount
the drive, and it will work just as fast as before." (the last post there is mine, btw..)

So my simple question is this: "What is the correct command to mount the USB flash drive, in order to mount it without sync option?"

If I will try that and it still doesn't fix the problem, then I should investigate it further, it's got to be some kind of configuration issue, right?
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Sep 27, 2009 2:45 pm

they infact told you the problem, some regression bug in the kernel. And you have the link to lkvm.
So the solution is simple, if it's fix, upgrade your kernel, if not yet fix, wait for an update kernel or use a kernel lower the version they report the bug appears.
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 2:47 pm

NeddySeagoon wrote:MarcusXP,

FLASH write speeds are limited by the FLASH chips used in the device.

You have clearly been moving things around between USB ports as your dmesg shows one arrangement of devices and your /proc/bus/usb/devices shows another. There is another speed limitation on USB storage - DMA cannot be used as USB does not support DMA.

Get usbview and use it to ensure your USB2 devices are all on EHCI ports and your USB1 devices are all on OHCI/UHCI ports.
Further, each root hub can only supply 500mA total for all connected devices. usbview will show you the power required by each device. Add them up and keep the total under 500mA.

Breaching any of these rules results in suboptimal USB performace.
I know that write speed is limited, but I clearly have an issue here, since the very same flash drive writes WAY faster on Windows - compare up to1MB/sec on Gentoo with 12-15MB/sec on Windows XP.
And when I performed the tests, I only had one device connected (not counting the USB mouse and keyboard, but that shouldn't count I think).
And it's not the USB port that is broken or limited to 1.1 speed, because I can read from the flash drive (or usb hard drive) with very good speeds, 20-30MB/sec (when they are inserted in the very same USB port).
So it seems most likely like the mount issue with "sync".. but I don't know which is the correct command to mount them, but looks like no one knows the answer :)
So before starting debugging the issue, (with loading/unloading modules, etc), let's just mount these flash drives with the correct option (that would be without "sync") and let me perform some other tests to see what happens.

I attached a screenshot showing my USBView window here:
http://marcusxp.dyndns.org/USB_view.png
You can see that my Kinston DataTraveler 150 is showing under "EHCI" (as it should).
The WD Passport hard drive was not connected at that time.
I took another screenshot after I connected the WD Passport hard drive (in another USB port), it is showing also under "EHCI".
http://marcusxp.dyndns.org/USB_view1.png
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 2:56 pm

krinn wrote:they infact told you the problem, some regression bug in the kernel. And you have the link to lkvm.
So the solution is simple, if it's fix, upgrade your kernel, if not yet fix, wait for an update kernel or use a kernel lower the version they report the bug appears.
The bug was reporting the problem in kernel 2.6.12-gentoo-r4
I am using 2.6.31-gentoo, do you think they didn't fix the issue until now?

Code: Select all

Marcus ~ # uname -a
Linux Marcus 2.6.31-gentoo #1 SMP Thu Sep 10 22:20:05 EDT 2009 x86_64 Intel(R) Xeon(R) CPU L5420 @ 2.50GHz GenuineIntel GNU/Linux
And if the bug still exists, why other users (that use 2.6.31) are not complaining?
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Sep 27, 2009 3:11 pm

http://bugs.gentoo.org/99039 wrote:I am have USB Flash drive (size is 1Gb, filesystem VFAT). Kernel detects it as:
Vendor: Kingston Model: DataTraveler II+ Rev: 1.13
MarcusXP wrote:For now, I've formatted a Kingston DataTraveler 150 32GB to NTFS.
-> might not be related, but as my flash drive works nice and that bug "seems" to affect few users, i suppose it's not good publicity for kingston datatraveler series...
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 3:20 pm

I have an interesting update..
my laptop is using 2.6.30-gentoo-r6:

Code: Select all

T61p ~ # uname -a
Linux T61p 2.6.30-gentoo-r6 #2 SMP Thu Sep 17 23:06:58 EDT 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz GenuineIntel GNU/Linux
I am currently copying some large files on my WD Passport with 20-22MB/sec (sustained), using Krusader.

I tested same hard drive on my other computer (also having 2.6.31, as the first one) to see what my results are..
I have found that it is copying with 28-30MB/sec (sustained!)

Code: Select all

Server / # uname -a
Linux Server 2.6.31-gentoo #2 SMP Thu Sep 17 20:12:16 EDT 2009 x86_64 Genuine Intel(R) CPU @ 2.50GHz GenuineIntel GNU/Linux
So only my first computer (that I am actually using the most) has this issue.. but I haven't tested my USB flash drives yet, only the WD Passport hard drive.
I am testing the Kingston flash drive and report soon my results.
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 3:22 pm

krinn wrote:
http://bugs.gentoo.org/99039 wrote:I am have USB Flash drive (size is 1Gb, filesystem VFAT). Kernel detects it as:
Vendor: Kingston Model: DataTraveler II+ Rev: 1.13
MarcusXP wrote:For now, I've formatted a Kingston DataTraveler 150 32GB to NTFS.
-> might not be related, but as my flash drive works nice and that bug "seems" to affect few users, i suppose it's not good publicity for kingston datatraveler series...
No it's not related, as I also have one Sandisk Cruzer micro 16GB and a Sony 16GB and they have the same behavior :)
and btw, the Kingston flash drive is WAY faster (at write speed) than the other ones (like double the speed) - on Windows, of course :D
so I guess this is good publicity, they should give me a gift for that ;)
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sun Sep 27, 2009 3:57 pm

doctork

You are exactly right, on modern computers all the ports can function as either usb2 or usb1, depending on the device you insert.
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sun Sep 27, 2009 4:58 pm

MarcusXP

This thread is very frustrating to a side observer like me, since from two pages of comments it is still impossible to get a clear description what does not work where and what is the diagnistics when things break. Could you please be a bit more systematic in describing your set up.

As the first step, could you unplug all other USB storage devices (you need your keyboard and mouse of course), take one USB stick, say Kingston 32GB, and report after clean reboot

1) Laptop in Gentoo - report (sustained after caching) transfer rates, dmesg, cat /proc/bus/usb/devices
2) Laptop in Windows - report transfer rates
3) Desktop in Gentoo - report (sustained after caching) transfer rates, dmesg, cat /proc/bus/usb/devices
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 5:25 pm

dmpogo wrote:MarcusXP

This thread is very frustrating to a side observer like me, since from two pages of comments it is still impossible to get a clear description what does not work where and what is the diagnistics when things break. Could you please be a bit more systematic in describing your set up.

As the first step, could you unplug all other USB storage devices (you need your keyboard and mouse of course), take one USB stick, say Kingston 32GB, and report after clean reboot

1) Laptop in Gentoo - report (sustained after caching) transfer rates, dmesg, cat /proc/bus/usb/devices
2) Laptop in Windows - report transfer rates
3) Desktop in Gentoo - report (sustained after caching) transfer rates, dmesg, cat /proc/bus/usb/devices
that's what I am doing right now.. I will have a report ready in a few minutes
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

Testing summary (writing tests)

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 6:09 pm

Notes: when the testing was performed, only one USB device is connected, other than my keyboard and mouse. Except laptop, where I use the builtin keyboard and touchpad, so no external mouse/keyboard.
Reading from these devices is usually very good on all computers. About 15-20MB/sec and more (for the Passport hard drive, I get 32-34MB/sec sustained, which is really good, I think better than reading speed on Windows)

Testing results for Kingston DataTraveler 150 32GB
Scenario 1 - formatted as ext2 (mounted with command: mount /dev/sdd1 /mnt/local/USBflash)
a. on my laptop the copy started as usual, doing some cache and then the speed dropped to few KB/sec (5KB-10KB/sec). this is VERY bad, unacceptable
b. on my server - similar result
c. on my desktop - similar result

Scenario 2 - formatted as NTFS (mounted with command: ntfs-3g /dev/sdd1 /mnt/local/USBflash)
a. on my laptop the copy started as usual, doing some cache and then the speed dropped to 10-14MB/sec and remained stable within these limits. looks like the normal behavior
b. on my server the copy started as usual, doing some cache and then the speed dropped to 10-14MB/sec and remained stable within these limits. looks like the normal behavior
c. on my desktop the copy started as usual, doing some cache and then the speed dropped to 6MB/sec, and then to 5MB/sec and kept going down slowly. I stopped it, as it doesn't seem like the good behavior.

Scenario 3 - formatted as FAT32 (mounted with command: mount /dev/sdd1 /mnt/local/USBflash)
a. on my laptop the copy started as usual, doing some cache and then the speed dropped to 1-4MB/sec and sometimes to few hundred KB/sec. BAD behavior
b. on my server the copy started as usual, doing some cache and then the speed dropped to 1-4MB/sec and sometimes to few hundred KB/sec. BAD behavior
c. on my desktop the copy started as usual, doing some cache and then the speed dropped to 1-4MB/sec and sometimes to few hundred KB/sec. BAD behavior


Testing results for my WD 500GB Passport hard drive.
Formatted as NTFS, I have no plans in messing with this one as I have lots of data on it (mounted with command: ntfs-3g /dev/sdd1 /mnt/local/USBflash)

a. on my laptop the copy started as usual, doing some cache and then the speed stabilized around 20-22MB/sec. looks like the normal behavior
The relevant part of "cat /proc/bus/usb/devices"

Code: Select all

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1058 ProdID=0705 Rev= 1.75
S:  Manufacturer=Western Digital
S:  Product=External HDD
S:  SerialNumber=57442D57584E583038535543333639
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=4ms
b. on my server the copy started as usual, doing some cache and then the speed stabilized around 25-28MB/sec. looks like the normal behavior
The relevant part of "cat /proc/bus/usb/devices"

Code: Select all

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1058 ProdID=0705 Rev= 1.75
S:  Manufacturer=Western Digital
S:  Product=External HDD
S:  SerialNumber=57442D57584E583038535543333639
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=4ms
c. on my desktop the copy started as usual, doing some cache and then the speed seem to stabilize around 20-25MB/sec. However, after copying about 3GB (out of a file of 4.4GB size) the speed dropped to 1-5MB/sec, sometimes a bit more. looks like a BAD behavior.
Test1: hdd is plugged in one USB port from behind of the computer (straight on the motherboard)
The relevant part of "cat /proc/bus/usb/devices"

Code: Select all

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1058 ProdID=0705 Rev= 1.75
S:  Manufacturer=Western Digital
S:  Product=External HDD
S:  SerialNumber=57442D57584E583038535543333639
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=4ms
The relevant part of "dmesg". Before these messages are the other messages with Kingston flash drive and so on.

Code: Select all

usb 1-3: new high speed USB device using ehci_hcd and address 6
usb 1-3: New USB device found, idVendor=1058, idProduct=0705
usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3: Product: External HDD
usb 1-3: Manufacturer: Western Digital
usb 1-3: SerialNumber: 57442D57584E583038535543333639
usb 1-3: configuration #1 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
input: Western Digital  External HDD     as /class/input/input8
generic-usb 0003:1058:0705.0008: input: USB HID v1.10 Device [Western Digital  External HDD    ] on usb-0000:00:1d.7-3/input1
scsi 6:0:0:0: Direct-Access     WD       5000BEV External 1.75 PQ: 0 ANSI: 4
sd 6:0:0:0: Attached scsi generic sg19 type 0
sd 6:0:0:0: [sdd] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 6:0:0:0: [sdd] Write Protect is off
sd 6:0:0:0: [sdd] Mode Sense: 23 00 00 00
sd 6:0:0:0: [sdd] Assuming drive cache: write through
usb-storage: device scan complete
sd 6:0:0:0: [sdd] Assuming drive cache: write through
 sdd: sdd1
sd 6:0:0:0: [sdd] Assuming drive cache: write through
sd 6:0:0:0: [sdd] Attached SCSI disk
I repeated the test on my desktop computer, by plugging the hard drive to a different USB port, and the slowdown occurred after copying about 4GB out of 4.4GB from that big file.
The speed dropped to 1-2MB/sec, rarely going over 4-5MB/sec.

Code: Select all

usb 1-8: new high speed USB device using ehci_hcd and address 7
usb 1-8: New USB device found, idVendor=1058, idProduct=0705
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-8: Product: External HDD
usb 1-8: Manufacturer: Western Digital
usb 1-8: SerialNumber: 57442D57584E583038535543333639
usb 1-8: configuration #1 chosen from 1 choice
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
input: Western Digital  External HDD     as /class/input/input9
generic-usb 0003:1058:0705.0009: input: USB HID v1.10 Device [Western Digital  External HDD    ] on usb-0000:00:1d.7-8/input1
scsi 7:0:0:0: Direct-Access     WD       5000BEV External 1.75 PQ: 0 ANSI: 4
sd 7:0:0:0: Attached scsi generic sg19 type 0
sd 7:0:0:0: [sdd] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 7:0:0:0: [sdd] Write Protect is off
sd 7:0:0:0: [sdd] Mode Sense: 23 00 00 00
sd 7:0:0:0: [sdd] Assuming drive cache: write through
usb-storage: device scan complete
sd 7:0:0:0: [sdd] Assuming drive cache: write through
 sdd: sdd1
sd 7:0:0:0: [sdd] Assuming drive cache: write through
sd 7:0:0:0: [sdd] Attached SCSI disk
To be noted that the exact same file of 4.4GB size was used in all tests. The file sits on the desktop computer and the location was mounted using NFS on my laptop and my server.
They are connected using gigabit network and the connectivity has no issues (I can copy with 80-100MB/sec between all these computers).
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Sun Sep 27, 2009 6:18 pm

I don't care so much about the "slowdown" issue on my Passport hard drive, because it occurs after more than 3GB are copied.
However, I cannot use the USB flash drives unless they are formatted as NTFS.. and on my desktop computer not even this works properly..

To summarize:

A. There is a problem with USB Flash drives when they are formatted as ext2 or FAT32 on all computers. When formatted as NTFS, they work fine on two computers, but not on my desktop computer (that I use mostly)
B. There is a problem (slowdown after 3-4GB copied) with WD Passport when it is connected on my desktop computer, but I can live with that. However, this confirms that my desktop computer has some kind of configuration issue, because not even the USB Flash drives (formatted as NTFS) are working properly here

In order to fix A, I think I need to mount the flash drives with some special options (when they are formatted as FAT32 or ext2), so they won't "sync" during transfer. However, I do not know how..
In order to fix B, more investigation is needed..
Top
strummer
n00b
n00b
Posts: 5
Joined: Fri Apr 17, 2009 8:38 am

  • Quote

Post by strummer » Mon Oct 12, 2009 5:04 pm

I still have this problem, .31 kernel didn't help. Actually I switched to Arch, but not because of this ;) I've tried mounting with async, but I guess it's default (you don't see that in /proc/mounts) because when I mount with sync, it's even slower.
Top
MarcusXP
Apprentice
Apprentice
Posts: 237
Joined: Wed Apr 18, 2007 2:38 am
Location: Toronto, ON, Canada

  • Quote

Post by MarcusXP » Mon Oct 12, 2009 5:09 pm

So which problem do you have, A or B from my summary?
I assume is A, right? (when using the USB flash drives with FAT32 filesystem)
That's what I want to fix too.. but I need to know if it's a kernel configuration issue, or wrong parameters for the "mount" command, or something else..
Not many people seem to have this issue, though.. or they didn't notice because they didn't copy large files to their USB flash drives maybe most ppl copy some documents, and in this case the problem is not obvious..
Top
strummer
n00b
n00b
Posts: 5
Joined: Fri Apr 17, 2009 8:38 am

  • Quote

Post by strummer » Mon Oct 12, 2009 10:55 pm

Yeah A is my problem, but I haven't tried ntfs, ext3 or any other file systems, just fat32. I need to have fat32 because I use the usb stick in my car player (which is actually an FM transmitter that reads usb sticks and SD memory cards). So what I'm copying is maybe 250 files, 2-30MB each. At first it copies maybe 20 songs very fast (a couple of seconds), but then it slows down and it takes maybe 30 minutes to copy them all (2GB).
Top
Post Reply

51 posts
  • Previous
  • 1
  • 2
  • 3
  • Next

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic