On Fri, 15 Sep 2006, William Wightman wrote:

> The external USB Hard-drive I have is not transferring data at 2.0 speeds.
> 
> USB HD is a:
>      Seagate P# 9Y1682-556  It is a USB 2.0 device which is suppose to
> handle 480 Mbits/sec.
> 
> I have examined the ports on the system and am confident that I am plugged
> into a USB 2.0 port.
> 
> Here's some info:
> 
> uname -a :
>      2.6.11-1.27_FC3 #1 Tue May 17 20:27:37 EDT 2005 i686 athlon i386
> GNU/Linux
> 
> /proc/bus/usb/devices:
> 
> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
> B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
> P:  Vendor=0000 ProdID=0000 Rev= 2.06
> S:  Manufacturer=Linux 2.6.11-1.27_FC3 ehci_hcd
> S:  Product=EHCI Host Controller
> S:  SerialNumber=0000:00:03.3
> 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=256ms
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=480 MxCh= 0

See that "Spd=480"?  It means your drive really is using a bus speed of
480 Mb/s = 60 MB/s.

> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=0bc2 ProdID=0501 Rev= 0.01
> S:  Manufacturer=Seagate
> S:  Product=USB Mass Storage
> S:  SerialNumber=000000084312
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> 
> 
> I download usbtree to get this information a little more readable:
> 
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M
>     |__ Port 3: Dev 2, If 0, Class=stor., Driver=usb-storage, 480M

Same here.

> Looking at this news ground in early 2005 I tried to get a measure of the
> transfer speed and I ran it twice:
> 
> # time dd if=/dev/sda1 of=/tmp/bigFile bs=1M count=100
> 100+0 records in
> 100+0 records out
> 
> real    0m7.943s
> user    0m0.004s
> sys     0m2.658s
> # time dd if=/dev/sda1 of=/tmp/bigFile bs=1M count=100
> 100+0 records in
> 100+0 records out
> 
> real    0m1.743s
> user    0m0.001s
> sys     0m1.716s

You should have specified of=/dev/null.  These timings are contaminated by 
the fact that the data had to be written to your main hard disk.

Still, if we estimate that it took 6 seconds to transfer 100 MB, that's a 
speed of about 16 MB/s.  Not tremendously fast, but certainly not as slow 
as full-speed USB.  That would be 12 Mb/s = 1.5 MB/s, which would require 
over 60 seconds to transfer 100 MB.

> took a look at /var/log/messages:
> 
> kernel: ACPI: PCI interrupt 0000:00:03.3[D] -> GSI 5 (level, low) -> IRQ 5
> kernel: ehci_hcd 0000:00:03.3: EHCI Host Controller
> kernel: ehci_hcd 0000:00:03.3: irq 5, pci mem 0xcffff000
> kernel: ehci_hcd 0000:00:03.3: new USB bus registered, assigned bus number 1
> kernel: ehci_hcd 0000:00:03.3: USB 2.0 initialized, EHCI 1.00, driver 10
> Dec 2004
> kernel: hub 1-0:1.0: USB hub found
> kernel: hub 1-0:1.0: 6 ports detected
> kernel: usb 1-3: new high speed USB device using ehci_hcd and address 2
> kernel: scsi12 : SCSI emulation for USB Mass Storage devices
> kernel:   Vendor: ST94011A  Model:                   Rev:  0 0
> kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
> kernel: SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
> kernel: sda: assuming drive cache: write through
> kernel: SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
> kernel: sda: assuming drive cache: write through
> kernel:  sda: sda1
> kernel: Attached scsi disk sda at scsi12, channel 0, id 0, lun 0
> tuck scsi.agent[12101]: disk at
> /devices/pci0000:00/0000:00:03.3/usb1/1-3/1-3:1.0/host12/target12:0:0/12:0:0:0
> fstab-sync[12149]: added mount point /media/SEAGATE for /dev/sda1

All perfectly normal.

> So that's where I am at.  Hopefully someone here will have some
> suggestions.  I've spent several hours at this looking on google and
> seeing what I can easily change.  It appears to me that the device and the
> bus are registering as USB2.0 devices but my throughput is very slow, 20G
> file ~ 28-34 minutes.

Approximately 11 MB/s, assuming these numbers aren't also contaminated.

>  Either A) My math is off and this is the best I can
> expect. or B) something is messed up with this code and it's treating my
> HIGH SPEED devices as FULL SPEED devices.

How about this: C) Everything is working as designed, but either the drive
or its USB interface weren't designed very well and hence are 2-3 times
slower than they could be.

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to