Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Hard disk very slow
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RichardMatley
n00b
n00b


Joined: 03 Dec 2005
Posts: 4

PostPosted: Sat Dec 03, 2005 8:15 pm    Post subject: USB Hard disk very slow Reply with quote

I have a Freecom external USB hard disk. Under Mandriva, it gives good performance (hdparm -tT buffered disk read speed ~22MB/s), while under Gentoo (my main and preferred OS) I only get:

/dev/sda:
Timing cached reads: 1688 MB in 2.00 seconds = 842.02 MB/sec
Timing buffered disk reads: 4 MB in 4.35 seconds = 942.62 kB/sec

This is using exactly the same system (laptop and connected devices).

From /proc/bus/usb/devices:
Quote:
T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=07ab ProdID=fc05 Rev= 2.40
S: Manufacturer=Freecom Technologies
S: Product=Classic SL Hard Drive
S: SerialNumber=DEF10A8FCD5E
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=12ms


There are some worrying looking lines in the dmesg output, such as:
Quote:
usb 2-3.1: new full speed USB device using ohci_hcd and address 4
usb 2-3.1: not running at top speed; connect to a high speed hub

(There are a few entries like this, not sure which, if any, applies to this device)

So it looks like Gentoo is not running it at maximum speed - even though Mandriva does (exactly the same hardware configuration, literally just rebooted).

Any ideas, please?

Richard
Back to top
View user's profile Send private message
evilben
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jun 2004
Posts: 128
Location: GA, USA

PostPosted: Sat Dec 03, 2005 8:31 pm    Post subject: Reply with quote

Do you have the ehci driver in your kernel?
Back to top
View user's profile Send private message
RichardMatley
n00b
n00b


Joined: 03 Dec 2005
Posts: 4

PostPosted: Sun Dec 04, 2005 4:16 pm    Post subject: Reply with quote

Sorry - I should have mentioned drivers in my initial post, according to lsmod, the following are currently loaded (among others):
Quote:
ehci_hcd 31816 0
ohci_hcd 21284 0
uhci_hcd 32144 0
usb_storage 70752 0
usbcore 115996 7 sl811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd
usbhid 43040 0


Thanks

Richard
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Tue Dec 13, 2005 9:46 pm    Post subject: Reply with quote

Similar problem:
Code:
Dec 13 16:45:47 wideload usb 3-1: new full speed USB device using uhci_hcd and address 3
Dec 13 16:45:48 wideload ub(3.3): GetMaxLUN returned 0, using 1 LUNs
Dec 13 16:45:49 wideload uba: uba1
Dec 13 16:45:56 wideload fstab-sync[11016]: added mount point /media/usbdisk for /dev/uba1

and
Code:

/dev/uba1:
 Timing buffered disk reads:    2 MB in 81.78 seconds =  25.04 kB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

The same device in another Gentoo computer gets orders of magnitude faster performance...
Back to top
View user's profile Send private message
RichardMatley
n00b
n00b


Joined: 03 Dec 2005
Posts: 4

PostPosted: Wed Dec 14, 2005 10:03 pm    Post subject: Reply with quote

Has anyone got any ideas? I've just bought an iPod and exactly the same thing happens - it seems to be running only at USB 1.1 speed.
I'd really appreciate any help anyone can give

Richard
Back to top
View user's profile Send private message
drjones69
n00b
n00b


Joined: 13 Dec 2005
Posts: 9

PostPosted: Wed Dec 14, 2005 10:27 pm    Post subject: Reply with quote

Just a thought,
What mount options are the devices being mounted with?

Seem to recall to problems on USB devices (esp. with newer kernel) if the 'sync' option is set for the mount, can't remember if it needs an 'async' option passing, or just not passing 'sync' - something to do with sync-ing writes - I've only experienced it on smaller USB flash sticks, but it certainly has sorted out the problem for me.

Also what are the other drive settings (hdparm -iI <disknode> - if memory serves), don't really have much experience with USB drives though.

Regards,
Ryan
Back to top
View user's profile Send private message
RichardMatley
n00b
n00b


Joined: 03 Dec 2005
Posts: 4

PostPosted: Wed Dec 14, 2005 10:36 pm    Post subject: Reply with quote

Thanks for the suggestion, but I've just tried async, and it doesn't help.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Wed Dec 14, 2005 11:08 pm    Post subject: Reply with quote

I thought
Code:
ohci_hcd 21284 0
uhci_hcd 32144 0

were two different usb 1.1 drivers and you probably only need one.
Don't know why both are loaded, could be causing a conflict or using wrong one?
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Thu Dec 15, 2005 5:43 pm    Post subject: Reply with quote

I collected info from the "good" system.
Code:
spooky ~ # lsmod | grep hci
ohci_hcd               21764  0
ehci_hcd               35272  0
uhci_hcd               34000  0
ohci1394               36148  0
ieee1394              103544  2 eth1394,ohci1394
usbcore               125696  9 snd_usb_audio,snd_usb_lib,ohci_hcd,ehci_hcd,usb_storage,usbmouse,usbhid,uhci_hcd

Since both uhci and ohci are loaded I don't think it causes a conflict.
I get:
Code:
/dev/sde1:
 Timing cached reads:   1376 MB in  2.00 seconds = 686.58 MB/sec
 Timing buffered disk reads:    2 MB in  4.12 seconds = 496.57 kB/sec


And it mounts this way:
Quote:
Dec 15 12:37:46 spooky usb 3-2: new full speed USB device using uhci_hcd and address 3
Dec 15 12:37:46 spooky scsi3 : SCSI emulation for USB Mass Storage devices
Dec 15 12:37:46 spooky usb-storage: device found at 3
Dec 15 12:37:46 spooky usb-storage: waiting for device to settle before scanning
Dec 15 12:37:51 spooky Vendor: OLYMPUS Model: u10D,S300D,u300D Rev: 1014
Dec 15 12:37:51 spooky Type: Direct-Access ANSI SCSI revision: 02
Dec 15 12:37:51 spooky SCSI device sde: 512000 512-byte hdwr sectors (262 MB)
Dec 15 12:37:51 spooky sde: Write Protect is off
Dec 15 12:37:51 spooky sde: Mode Sense: 17 00 00 08
Dec 15 12:37:51 spooky sde: assuming drive cache: write through
Dec 15 12:37:51 spooky SCSI device sde: 512000 512-byte hdwr sectors (262 MB)
Dec 15 12:37:51 spooky sde: Write Protect is off
Dec 15 12:37:51 spooky sde: Mode Sense: 17 00 00 08
Dec 15 12:37:51 spooky sde: assuming drive cache: write through
Dec 15 12:37:51 spooky sde: sde1
Dec 15 12:37:51 spooky Attached scsi removable disk sde at scsi3, channel 0, id 0, lun 0
Dec 15 12:37:51 spooky usb-storage: device scan complete
Dec 15 12:37:52 spooky scsi.agent[15948]: disk at /devices/pci0000:00/0000:00:10.2/usb3/3-2/3-2:1.0/host3/target3:0:0/3:0:0:0
Dec 15 12:37:53 spooky fstab-sync[16004]: added mount point /media/usbdisk for /dev/sde1

I'll edit this with the same data from the "bad" system (my laptop). The above (my desktop) is quite different than the laptop, for reasons I haven't yet been able to research.
Back to top
View user's profile Send private message
IBColeman
n00b
n00b


Joined: 06 Nov 2003
Posts: 2

PostPosted: Fri Jan 20, 2006 5:47 pm    Post subject: slow USB Reply with quote

Looking at your Spd value below ("Spd=12" should be "Spd=480"), and the ("MxPS=64" should be "MxPS=512") values, it really does look like your drive's not taking advantage of the ehci_hcd module:

Quote:

T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=07ab ProdID=fc05 Rev= 2.40
S: Manufacturer=Freecom Technologies
S: Product=Classic SL Hard Drive
S: SerialNumber=DEF10A8FCD5E
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=12ms


I'd try to play around with rmmod'ing uhci_hcd (I think you said it was there?). I just fixed the same problem by building and loading ehci_hcd.

Good Luck,

Ian
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Sun Mar 12, 2006 12:01 am    Post subject: Reply with quote

I finaly got the stuff from the bad system:
Code:
T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=07b4 ProdID=0102 Rev=10.14
S:  Manufacturer=OLYMPUS
S:  Product=u10D,S300D,u300D
S:  SerialNumber=124737289
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=ub
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Code:
Mar 11 18:54:27 wideload usb 3-1: new full speed USB device using uhci_hcd and address 2
Mar 11 18:54:27 wideload ub(3.2): GetMaxLUN returned 0, using 1 LUNs
Mar 11 18:54:37 wideload hald[8265]: Timed out waiting for hotplug event 1093. Rebasing to 1095
Mar 11 18:54:39 wideload uba: uba1
Mar 11 18:54:45 wideload fstab-sync[25231]: added mount point /media/usbdisk for /dev/uba1

I tried rmmoding uhci_hcd, but on my system it doesn't recognize anything then because the bridge uses that driver. Rmmoding ehci_hcd had no effect.

It seems like there is a bug in uhci_hcd for this chipset, maybe? I say that because same kernel and everything and same camera in another computer works fine...

Btw, why does this computer get uba1 and the other one get sde1?
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Fri Apr 28, 2006 7:08 pm    Post subject: Reply with quote

BigBaaadBob wrote:
Btw, why does this computer get uba1 and the other one get sde1?

Anyone?
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Tue May 09, 2006 7:17 am    Post subject: Reply with quote

Now I can't even get the disk to mount, after a major update. Using kernel:2.6.16-gentoo-r6.
Code:
May  9 02:56:47 wideload usb 5-5: new high speed USB device using ehci_hcd and address 2
May  9 02:56:47 wideload usb 5-5: configuration #1 chosen from 1 choice
May  9 02:56:48 wideload ub(5.2): GetMaxLUN returned 0, using 1 LUNs
May  9 02:56:48 wideload uba: uba1
May  9 02:56:48 wideload usbcore: registered new driver ub
May  9 02:56:48 wideload SCSI subsystem initialized
May  9 02:56:48 wideload Initializing USB Mass Storage driver...
May  9 02:56:48 wideload usbcore: registered new driver usb-storage
May  9 02:56:48 wideload USB Mass Storage support registered.

But gnome-volume-manager can't mount it because it says uba1 isn't in fstab/mtab. Huh? Do I have the kernel misconfigured?
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Tue May 09, 2006 8:06 am    Post subject: Reply with quote

You probably have the Low Performance USB driver in your new kernel.

Code:

Device Drivers --->
    Block Devices --->
        < > Low Performance USB Block driver


That's also why the devices are now showing up as /dev/ubx instead of /dev/sdax.


troymc
Back to top
View user's profile Send private message
SDark
n00b
n00b


Joined: 02 May 2006
Posts: 47
Location: Portugal

PostPosted: Tue May 09, 2006 8:52 am    Post subject: Reply with quote

BigBaaadBob wrote:
Now I can't even get the disk to mount, after a major update. Using kernel:2.6.16-gentoo-r6.
Code:
May  9 02:56:47 wideload usb 5-5: new high speed USB device using ehci_hcd and address 2
May  9 02:56:47 wideload usb 5-5: configuration #1 chosen from 1 choice
May  9 02:56:48 wideload ub(5.2): GetMaxLUN returned 0, using 1 LUNs
May  9 02:56:48 wideload uba: uba1
May  9 02:56:48 wideload usbcore: registered new driver ub
May  9 02:56:48 wideload SCSI subsystem initialized
May  9 02:56:48 wideload Initializing USB Mass Storage driver...
May  9 02:56:48 wideload usbcore: registered new driver usb-storage
May  9 02:56:48 wideload USB Mass Storage support registered.

But gnome-volume-manager can't mount it because it says uba1 isn't in fstab/mtab. Huh? Do I have the kernel misconfigured?


Probably your fstab points to /dev/ubX which doesn't exist anymore. Check your /dev/ for sdX and see if that solves your problem.

PS: The info troymc gave is very helpful I had similar problems with a usb pen, showing up as /dev/uba1 and getting slower speeds.
_________________
Thread topic to [solved] if the problem is in fact solved :)
Don't waste your time on crack! Do something for the community and adopt an unanswered post
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Tue May 09, 2006 9:33 am    Post subject: Reply with quote

Yes, it turns out that disabling the CONFIG_BLK_DEV_UB option fixed the UBA thing. (The help for that option should have clued me in!). But I still can't get it to automount. Now I get:
Code:
May  9 05:34:55 wideload usb 5-1: new high speed USB device using ehci_hcd and address 5
May  9 05:34:55 wideload usb 5-1: configuration #1 chosen from 1 choice
May  9 05:34:55 wideload scsi3 : SCSI emulation for USB Mass Storage devices
May  9 05:34:55 wideload usb-storage: device found at 5
May  9 05:34:55 wideload usb-storage: waiting for device to settle before scanning
May  9 05:35:00 wideload Vendor: Generic   Model: STORAGE DEVICE    Rev: 1033
May  9 05:35:00 wideload Type:   Direct-Access                      ANSI SCSI revision: 00
May  9 05:35:01 wideload SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
May  9 05:35:01 wideload sda: Write Protect is off
May  9 05:35:01 wideload sda: Mode Sense: 02 00 00 00
May  9 05:35:01 wideload sda: assuming drive cache: write through
May  9 05:35:01 wideload SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
May  9 05:35:01 wideload sda: Write Protect is off
May  9 05:35:01 wideload sda: Mode Sense: 02 00 00 00
May  9 05:35:01 wideload sda: assuming drive cache: write through
May  9 05:35:01 wideload sda: sda1
May  9 05:35:01 wideload sd 3:0:0:0: Attached scsi removable disk sda
May  9 05:35:01 wideload usb-storage: device scan complete
May  9 05:35:01 wideload scsi.agent[11479]: disk at /devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host3/target3:0:0/3:0:0\:0

But GVM doesn't automount, complaining about SDA1 not being in fstab/mtab. What other debugging can I do?
Code:
manager.c/1877: Device added: /org/freedesktop/Hal/devices/usb_device_781_7104_202040612
manager.c/1877: Device added: /org/freedesktop/Hal/devices/usb_device_781_7104_202040612_if0
manager.c/1877: Device added: /org/freedesktop/Hal/devices/usb_device_781_7104_202040612_if0_scsi_host
manager.c/1877: Device added: /org/freedesktop/Hal/devices/usb_device_781_7104_202040612_if0_scsi_host_scsi_device_lun0
manager.c/1877: Device added: /org/freedesktop/Hal/devices/storage_model_STORAGE_DEVICE
manager.c/1696: not a mountable volume: /org/freedesktop/Hal/devices/storage_model_STORAGE_DEVICE
manager.c/1877: Device added: /org/freedesktop/Hal/devices/volume_part1_size_262127616
manager.c/1727: Changed: /dev/sda1
manager.c/1330: mounting /org/freedesktop/Hal/devices/volume_part1_size_262127616...
manager.c/753: executing command: mount /dev/sda1
mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Tue May 09, 2006 10:30 am    Post subject: Reply with quote

Show us your /etc/fstab file.

Do you not have an entry for sda1?


troymc
Back to top
View user's profile Send private message
BigBaaadBob
Guru
Guru


Joined: 19 Apr 2003
Posts: 342
Location: Swampscott, MA USA

PostPosted: Tue May 09, 2006 11:17 am    Post subject: Reply with quote

troymc wrote:
Do you not have an entry for sda1?

No, because GVM (gnome-volume-manager) is supposed to add it for me.

EDIT: DOH!!! Never mind. I just discovered that I need to be in the plugdev group for this to work..... It works now.
Back to top
View user's profile Send private message
Axela
n00b
n00b


Joined: 09 Aug 2003
Posts: 12

PostPosted: Sun Aug 06, 2006 8:25 am    Post subject: Reply with quote

Somebody solved the problem?
I've an external 400gb hd connected with USB2.0
I get about 1MB/s with hdparm on that HD.

When I tranfer big files (about 600MB) I see a strange thing: after the first 50-100mb it stop for about 30-40 seconds (The kernel is in IOWait state) and then resume the trasfer of other 50-100mb and so on.
I don't see any error/warning in the kernel log during the transfer.


Code:
lspci -v|grep HCI
00:11.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 18) (prog-if 00 [UHCI])
00:11.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 18) (prog-if 00 [UHCI])
00:11.4 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 18) (prog-if 00 [UHCI])


Code:
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b4 ProdID=6830 Rev= 2.40
S:  Product=Cypress AT2LP      RC7
S:  SerialNumber=DEF10B56CE2E
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=86(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=12ms


Code:
usb 1-2: new full speed USB device using uhci_hcd and address 2
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
  Vendor: ST340083  Model: 2A                Rev: 0000
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB)
sda: assuming drive cache: write through
SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB)
sda: assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: Attached scsi disk sda
usb-storage: device scan complete
Back to top
View user's profile Send private message
linuxtuxhellsinki
l33t
l33t


Joined: 15 Nov 2004
Posts: 700
Location: Hellsinki

PostPosted: Sun Aug 06, 2006 11:44 am    Post subject: Reply with quote

Axela wrote:
Somebody solved the problem?
I've an external 400gb hd connected with USB2.0
I get about 1MB/s with hdparm on that HD.


No, it seems like your drive is connected to USB1.1 bus, which has maxium speed about that 1MB/s :?
_________________
1st use 'Search' & lastly add [Solved] to
the subject of your first post in the thread.
Back to top
View user's profile Send private message
firehawk
n00b
n00b


Joined: 11 Jan 2004
Posts: 34
Location: Cape Town , South Africa

PostPosted: Sun Aug 06, 2006 2:59 pm    Post subject: Removing sync in fast option helped me Reply with quote

I had the same problem with only getting usb1 speeds on my usb2 drives and flash disk.

Fixed it by removing the sync option in my /etc/fstab file. It has something to do with the new kernel, not exactly sure from which kernel onwards. but pretty recent I would say. drjones69 did mention removing the sync option too. Try removing sync options al together instead on async?

Hope this helps
Back to top
View user's profile Send private message
Axela
n00b
n00b


Joined: 09 Aug 2003
Posts: 12

PostPosted: Sun Aug 06, 2006 4:42 pm    Post subject: Reply with quote

linuxtuxhellsinki wrote:
Axela wrote:
Somebody solved the problem?
I've an external 400gb hd connected with USB2.0
I get about 1MB/s with hdparm on that HD.


No, it seems like your drive is connected to USB1.1 bus, which has maxium speed about that 1MB/s :?


Yes, I discovered it some minutes after posting the message.
I'll try to buy an UBS 2.0 hub :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum