Speed up USB-Harddisks

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Speed up USB-Harddisks

#1 Post by MU »

I just bought a 200 Gig- USB 2.0 Harddisk (Trekstor Datastation maxi y.uh ;140 Euro).

As my Notebook just has an USB 1.1 -port, I also bought a PCMCIA to USB 2.0-adapter (Sitecom USB 2.0 PC Card CB-003V2 ;30 Euro).

Plugged it in, attached the harddisk.
Startet MUT, and the harddisk was visible and could be mounted (great, Mandrake-Linux 9.2 does not recognize the USB 2.0-Port).

Then I copied a large file: awfull slow.
So I ran the "usbview"-Tool.

It tells me something about ohci and 12 MBit.
Well, USB 2.0 supports 480 MBit.

Watching the booklet, in the specifications it sais:
"the device consists of two openhost Controller Interfaces (ohci), and one Enhanced Host Controller Interface (ehci)".

So I looked for a module:
ls /lib/modules/2.4.29/usb/host
ehci-hcd.o.gz uhci.o.gz usb-ohci.o.gz usb-uhci.o.gz

Ah great, right what I need.

modprobe ehci-hcd
and *whoooosch* it is fast as hell :-)

You should add that command to the bootprocess, for example to /etc/rc.d/rc.local0

Mark

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#2 Post by dvw86 »

Would this effect the boot-from-USB time? I noticed that my VIA board that supports USB 2.0 takes just as long to boot Puppy from a USB 1.1 pen drive as a 2.0 drive.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#3 Post by MU »

I think so.

But I did not have a look, where to add that in the startup-scripts (You would have to create a new image.gz containing this command I think)

Mark

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#4 Post by dvw86 »

I think that would be a very good thing to add. It would make Puppy much more attractive as a USB boot option.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

You should add that to the "suggestions"-board.

Mark

User avatar
aahhaaa
Posts: 341
Joined: Fri 07 Oct 2005, 03:21
Location: Lower Michigan, North America

#6 Post by aahhaaa »

dvw86 wrote:Would this effect the boot-from-USB time? I noticed that my VIA board that supports USB 2.0 takes just as long to boot Puppy from a USB 1.1 pen drive as a 2.0 drive.
don't know if this applies to your VIA Board, but mine has USB options in the BIOS...

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#7 Post by dvw86 »

MU wrote: You should add that to the "suggestions"-board.
Done
http://www.murga.org/%7Epuppy/viewtopic.php?t=3361&highlight=
aahhaaa wrote: don't know if this applies to your VIA Board, but mine has USB options in the BIOS...
I'll take a look, but DSL at 50MB boots much faster than Puppy does from the same pen drive.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

Guys,
the capability is there in Puppy, it is up to you to provide information.
Look at:

/lib/libhardware/usb.db

You need to provide chip numbers and what module is required.

You can get the chip numbers from "Control panel -> Hardware probe".

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#9 Post by MU »

ok, this is strange.

it is mentioned in /lib/libhardware/usb
1033|0035|usb-ohci|NEC Corp|USB
1033|00e0|ehci-hcd|NEC Corp|PCI to USB Enhanced Host Controller


The following shows, that it is detected as USB-2 EHCI Device, but with slow speed. just when I run modprobe manually, it uses fullspeed.

first the results, when I do not run modprobe ehci-hcd

------------
===== query_pci_devices =====
1033: e0 (12,3) 0 [ (null) - (null) ] (null)
1033: 35 (12,3) 0 [ (null) - (null) ] (null)
1033: 35 (12,3) 0 [ (null) - (null) ] (null)

===== parse_pci_devices =====
1033: e0 (12,3) 11 [ NEC Corp - PCI to USB Enhanced Host Controller ] USB ehci-hcd
1033: 35 (12,3) 11 [ NEC Corp - USB ] USB usb-ohci
1033: 35 (12,3) 11 [ NEC Corp - USB ] USB usb-ohci

MODULES:
USB ehci-hcd: NEC Corp PCI to USB Enhanced Host Controller (1033: e0) detected.
USB usb-ohci: NEC Corp USB (1033: 35) running.
USB usb-ohci: NEC Corp USB (1033: 35) running.
CARDBUS yenta_socket: ENE Technology Inc CB1410 CardBus Controller (1524:1410) running.
--------
USB-View:
--------
USB2.0 Hub
Speed: 12Mb/s (full)
Number of Ports: 4
USB Version: 2.00
Device Class: 09(hub )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 64
Number of Configurations: 1
Vendor Id: 05e3
Product Id: 0605
Revision Number: 6.0b

Config Number: 1
Number of Interfaces: 1
Attributes: e0
MaxPower Needed: 100mA

Interface Number: 0
Name: hub
Alternate Number: 0
Class: 09(hub )
Sub Class: 0
Protocol: 0
Number of Endpoints: 1

Endpoint Address: 81
Direction: in
Attribute: 3
Type: Int.
Max Packet Size: 1
Interval: 255ms

----------------
----------------
Now the result when I do run modprobe ehci-hcd
-----
===== query_pci_devices =====
1033: e0 (12,3) 0 [ (null) - (null) ] (null)
1033: 35 (12,3) 0 [ (null) - (null) ] (null)
1033: 35 (12,3) 0 [ (null) - (null) ] (null)
===== parse_pci_devices =====
1033: e0 (12,3) 11 [ NEC Corp - PCI to USB Enhanced Host Controller ] USB ehci-hcd
1033: 35 (12,3) 11 [ NEC Corp - USB ] USB usb-ohci
1033: 35 (12,3) 11 [ NEC Corp - USB ] USB usb-ohci

MODULES:
USB ehci-hcd: NEC Corp PCI to USB Enhanced Host Controller (1033: e0) running.
USB usb-ohci: NEC Corp USB (1033: 35) running.
USB usb-ohci: NEC Corp USB (1033: 35) running.
CARDBUS yenta_socket: ENE Technology Inc CB1410 CardBus Controller (1524:1410) running.

--------
USB-View:
--------
USB2.0 Hub
Speed: 480Mb/s (high)
Number of Ports: 4
USB Version: 2.00
Device Class: 09(hub )
Device Subclass: 00
Device Protocol: 01
Maximum Default Endpoint Size: 64
Number of Configurations: 1
Vendor Id: 05e3
Product Id: 0605
Revision Number: 6.0b

Config Number: 1
Number of Interfaces: 1
Attributes: e0
MaxPower Needed: 100mA

Interface Number: 0
Name: hub
Alternate Number: 0
Class: 09(hub )
Sub Class: 0
Protocol: 0
Number of Endpoints: 1

Endpoint Address: 81
Direction: in
Attribute: 3
Type: Int.
Max Packet Size: 1
Interval: 256ms

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

I made the last posting with the Harddisk attached.
The Harddisk has an integrated USB-Hub.

If i unattach it, I get the same results, but usbview shows something different.

Without the modprobe, the USB-2 Adapter is not visible.
After modprobe, it is visible as
PCI device 1033:00e0
(in the former message it was named USB2.0 Hub)

Maybe the bootscripts check for ehci first, before they check for pcmcia?
So it has no effect?

----
PCI device 1033:00e0
Manufacturer: Linux 2.4.29 ehci_hcd
Serial Number: 02:00.2
Speed: 480Mb/s (high)
Number of Ports: 3
Bandwidth allocated: 0 / 800 (0%)
Total number of interrupt requests: 0
Total number of isochronous requests: 0
USB Version: 2.00
Device Class: 09(hub )
Device Subclass: 00
Device Protocol: 01
Maximum Default Endpoint Size: 8
Number of Configurations: 1

Config Number: 1
Number of Interfaces: 1
Attributes: 40
MaxPower Needed: 0mA

Interface Number: 0
Name: hub
Alternate Number: 0
Class: 09(hub )
Sub Class: 0
Protocol: 0
Number of Endpoints: 1

Endpoint Address: 81
Direction: in
Attribute: 3
Type: Int.
Max Packet Size: 2
Interval: 256ms

User avatar
BlackAdder
Posts: 385
Joined: Sun 22 May 2005, 23:29

USB 2.0 Speedup

#11 Post by BlackAdder »

I Can confirm Mark's results, at least in terms of the speedup happening after a manual modprobe ehci-hcd.
Was pondering a hacked version of /etc/rc.d/rc.modules, just before the comment:

Code: Select all

#reckon we will always want to access usb memory devices...
 #modprobe usb-storage
adding something like:

Code: Select all

scanmodule | grep "ehci" > /dev/null
if [ $? -eq 0 ]; then
   modprobe ehci-hcd
fi
Really hackish I guess, but right at the limit of my script ability.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#12 Post by BarryK »

I'm wary of playing with the detection code right now, just before
releasing 1.0.6...

dmesg | grep "ehci"

might also do it.

we need to remaster the CD with a code modification that does detect the
ehci.
I'm puzzled though, scanmodule is supposed to identify that chipset then
load the ehci driver. I don't know why the chip is unavailable to scanmodule
before ehci is loaded.

User avatar
ChechenPuppy
Posts: 19
Joined: Tue 16 May 2006, 01:47

#13 Post by ChechenPuppy »

BarryK wrote:Guys,
the capability is there in Puppy, it is up to you to provide information.
Look at:

/lib/libhardware/usb.db

You need to provide chip numbers and what module is required.

You can get the chip numbers from "Control panel -> Hardware probe".


May the proper additions to this file also help to enable booting from the external USB CDROM.

How can I find the "chip number" then?

User avatar
ChechenPuppy
Posts: 19
Joined: Tue 16 May 2006, 01:47

Re: Speed up USB-Harddisks

#14 Post by ChechenPuppy »

MU wrote:
modprobe ehci-hcd
and *whoooosch* it is fast as hell :-)
It's interesting. Would you please tell how fast it is now, and how many rpm-s has your external disk?

HansKooiman
Posts: 10
Joined: Mon 03 Jul 2006, 14:55
Location: Netherlands

Re: Speed up USB-Harddisks

#15 Post by HansKooiman »

Thanks Mark, very good idea, I'll look for cheap pcmcia-usb2.0. Hans

[As my Notebook just has an USB 1.1 -port, I also bought a PCMCIA to USB 2.0-adapter (Sitecom USB 2.0 PC Card CB-003V2 ;30 Euro).

ls /lib/modules/2.4.29/usb/host
ehci-hcd.o.gz uhci.o.gz usb-ohci.o.gz usb-uhci.o.gz

Ah great, right what I need: modprobe ehci-hcd and *whoooosch* it is fast as hell :-) You should add that command to the bootprocess, for example to /etc/rc.d/rc.local0 Mark]

An3Azz
Posts: 3
Joined: Wed 06 Sep 2006, 08:46

#16 Post by An3Azz »

When I try the above solution MUT hangs, and my usb drive won't mount. The only solution is to reboot the machine. I run puppy 1.09CE

HansKooiman
Posts: 10
Joined: Mon 03 Jul 2006, 14:55
Location: Netherlands

Re: Speed up USB-Harddisks

#17 Post by HansKooiman »

[MU: As my Notebook just has an USB 1.1 -port, I also bought a PCMCIA to USB 2.0-adapter (Sitecom USB 2.0 PC Card CB-003V2 ;30 Euro).]

Funny, found the same one. It doesn't fit well in the pcmcia-slot, now it's OK. And the ehci-hcd-module does the job.

I looked for a filesystem-benchmark, found some source code, but I don't compile yet, tiny computer.

Anyone know where to download a nice fs-benchmark-dotpup?

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#18 Post by GuestToo »

does hdparm work with that device?

for example, to benchmark a hard drive, hda:

hdparm -Tt /dev/hda

for help, type:

hdparm --help

HansKooiman
Posts: 10
Joined: Mon 03 Jul 2006, 14:55
Location: Netherlands

#19 Post by HansKooiman »

Thank you, I'll find and try. Hans
GuestToo wrote:does hdparm work with that device?

for example, to benchmark a hard drive, hda:

hdparm -Tt /dev/hda

for help, type:

hdparm --help

Post Reply