| View previous topic :: View next topic |
| Author |
Message |
pinopineta n00b

Joined: 07 Jun 2006 Posts: 29 Location: Torino
|
Posted: Tue Jun 12, 2012 3:18 pm Post subject: USB 3.0 - XHCI. Too slow. |
|
|
Hi all.
I've
| Quote: | CONFIG_USB_ARCH_HAS_XHCI=y
CONFIG_USB_XHCI_HCD=y
# CONFIG_USB_XHCI_HCD_DEBUGGING is not set |
and my laptop has a usb3 port.
I've linked it with my 2.5 hd which has usb 3 support.
But the average of transfer time is around 30-50 MB/sec.
Why?  _________________ pinopineta@hotmail.com
'cause nothin' lasts forever |
|
| Back to top |
|
 |
gentoo_ram Guru

Joined: 25 Oct 2007 Posts: 395 Location: San Diego, California USA
|
Posted: Tue Jun 12, 2012 8:49 pm Post subject: |
|
|
| What are you using to test it with? If it's a hard drive, maybe you've hit the limit of the hard drive. Any bus-powered USB hard drives are probably not going to be terribly fast. |
|
| Back to top |
|
 |
pinopineta n00b

Joined: 07 Jun 2006 Posts: 29 Location: Torino
|
Posted: Wed Jun 13, 2012 9:18 am Post subject: |
|
|
I saw the average from the pop-up of nautilus when I drag and dropped some GB of files.
My internal hd is quite empty (about 200GB of 750 is full) and the external USB3 hd is full only for 100GB of 1TB.
What do you mean with BUS-powered hard drive?
Either HD are 7200RPM, internal have 64MB of cache and external maybe 16MB.
But the external is USB 3.0 compilant.
I dunno if it a problem of mykernel config.
But the speed seems like of USB 2.0 protocol specs. _________________ pinopineta@hotmail.com
'cause nothin' lasts forever |
|
| Back to top |
|
 |
depontius Advocate

Joined: 05 May 2004 Posts: 2156
|
Posted: Wed Jun 13, 2012 12:27 pm Post subject: |
|
|
Cable?
USB3 uses a different cable than USB1 or USB2, which are pretty much fully compatible with each other. USB2 uses the same wire set as USB1, but will require higher signal quality, so it's possible a cheap USB1 cable will force USB2 to fall back to USB1. USB3 uses 9 wires instead of the 4 wires of USB1 and USB2. It isn't simply a signal quality issue. USB3 is sufficiently compatible to fall back to USB 1 or 2 performance if that's all the cabling will support. I'll also presume that a USB3 cable will carry USB 1 or 2 signals. It'll all work, but to get full performance everything from end-to-end has to be USB3.
Since you were explicit about USB3 for both computer and hard drive, I presume you were using an existing USB cable. _________________ .sigs waste space and bandwidth |
|
| Back to top |
|
 |
lagalopex Guru


Joined: 16 Oct 2004 Posts: 428
|
Posted: Wed Jun 13, 2012 2:46 pm Post subject: |
|
|
40 MiB/s would be a very good score for USB2.
I have a usb3 external hdd (bus-powered, 5400rpm) on an usb3 port and i reach 95 MiB/s seq. reading.
I have the same xhci options enabled you have.
What does dmesg tell you? Is xhci used?
What cabled do you use? Just the cable (from your external hdd) to the back-port on your motherboard? (No "front usb-plugs" or other type of extension cords.) _________________ System: AMD Phenom II X4 840, 16GB RAM, NVidia GeForce GT 520, ASUS M4A87TD/USB3, Raid, Seagate Constellation ES
AMD64 system slow/unresponsive during disk access... |
|
| Back to top |
|
 |
Ant P. Veteran

Joined: 18 Apr 2009 Posts: 1920 Location: UK
|
Posted: Wed Jun 13, 2012 8:22 pm Post subject: |
|
|
| 50MB/s for a portable spinning-rust hard drive is actually pretty fast. |
|
| Back to top |
|
 |
HeissFuss Guru

Joined: 11 Jan 2005 Posts: 400
|
Posted: Thu Jun 14, 2012 12:18 am Post subject: |
|
|
| Try running 'hdparm -t' on the raw sd device. |
|
| Back to top |
|
 |
pinopineta n00b

Joined: 07 Jun 2006 Posts: 29 Location: Torino
|
Posted: Thu Jun 14, 2012 7:23 am Post subject: |
|
|
Ok.
The cable is an USB3 cable shipped with my external USB3 capable HD.
So The cable, the HD, the USB port on my laptop are all USB3 capable.
hdparm report values that are very similar to my internal hd ... So I think that is strange and maybe hdparm is tuned for ata drive and not for sata compilant? _________________ pinopineta@hotmail.com
'cause nothin' lasts forever |
|
| Back to top |
|
 |
HeissFuss Guru

Joined: 11 Jan 2005 Posts: 400
|
Posted: Fri Jun 15, 2012 12:35 am Post subject: |
|
|
Could you share the output from hdparm? The -t test is just sequentially reading blocks from the device, nothing special. It avoids filesystem/alignment issues though, so should be close to max raw throughput from a single device (reading from the edge of the platters.)
Also, what's the external drive model? |
|
| Back to top |
|
 |
depontius Advocate

Joined: 05 May 2004 Posts: 2156
|
Posted: Fri Jun 15, 2012 1:51 am Post subject: |
|
|
What does dmesg say right after you plug the USB drive in? (Plug it in after booting, that is.) In this case, you're not looking to use the filesystem or even the drive itself, I'm wondering what messages the USB subsystem emits upon plugin. Having a roottail on /var/log/messages while you do it would be a good idea, too. _________________ .sigs waste space and bandwidth |
|
| Back to top |
|
 |
pinopineta n00b

Joined: 07 Jun 2006 Posts: 29 Location: Torino
|
Posted: Fri Jun 22, 2012 11:44 am Post subject: |
|
|
After plug in the usb3 laptop port:
| Code: | [ 2916.930119] wlan0: no IPv6 routers present
[ 4970.732217] hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0002
[ 4970.732236] hub 4-0:1.0: port 1, status 0203, change 0001, 5.0 Gb/s
[ 4970.835370] hub 4-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x203
[ 4970.940716] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
[ 4970.951805] usb 4-1: skipped 1 descriptor after endpoint
[ 4970.951809] usb 4-1: skipped 1 descriptor after endpoint
[ 4970.951881] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 4970.951901] usb 4-1: default language 0x0409
[ 4970.952054] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 4970.952183] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 4970.952423] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 4970.952503] usb 4-1: udev 2, busnum 4, minor = 385
[ 4970.952507] usb 4-1: New USB device found, idVendor=1058, idProduct=0730
[ 4970.952510] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4970.952513] usb 4-1: Product: My Passport 0730
[ 4970.952517] usb 4-1: Manufacturer: Western Digital
[ 4970.952521] usb 4-1: SerialNumber: 57584C3145313159464D3134
[ 4970.952586] usb 4-1: usb_probe_device
[ 4970.952590] usb 4-1: configuration #1 chosen from 1 choice
[ 4970.953598] usb 4-1: Successful Endpoint Configure command
[ 4970.953668] usb 4-1: adding 4-1:1.0 (config #1, interface 0)
[ 4970.953707] usb-storage 4-1:1.0: usb_probe_interface
[ 4970.953713] usb-storage 4-1:1.0: usb_probe_interface - got id
[ 4970.953826] scsi6 : usb-storage 4-1:1.0
[ 4970.953892] drivers/usb/core/inode.c: creating file '002'
[ 4972.920115] scsi 6:0:0:0: Direct-Access WD My Passport 0730 1015 PQ: 0 ANSI: 6
[ 4972.920244] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 4978.132681] sd 6:0:0:0: [sdb] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[ 4978.132894] sd 6:0:0:0: [sdb] Write Protect is off
[ 4978.132898] sd 6:0:0:0: [sdb] Mode Sense: 47 00 10 08
[ 4978.133197] sd 6:0:0:0: [sdb] No Caching mode page present
[ 4978.133199] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4978.134202] sd 6:0:0:0: [sdb] No Caching mode page present
[ 4978.134206] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4978.183076] sdb: sdb1 sdb2 < sdb5 sdb6 >
[ 4978.184204] sd 6:0:0:0: [sdb] No Caching mode page present
[ 4978.184208] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4978.184211] sd 6:0:0:0: [sdb] Attached SCSI disk
[ 4978.185457] xhci_hcd 0000:04:00.0: WARN: Stalled endpoint
[ 4978.346405] xhci_hcd 0000:04:00.0: WARN: Stalled endpoint
|
| Code: |
pineta pino # hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 17542 MB in 2.00 seconds = 8779.71 MB/sec
Timing buffered disk reads: 256 MB in 3.02 seconds = 84.88 MB/sec |
_________________ pinopineta@hotmail.com
'cause nothin' lasts forever |
|
| Back to top |
|
 |
HeissFuss Guru

Joined: 11 Jan 2005 Posts: 400
|
Posted: Fri Jun 22, 2012 4:51 pm Post subject: |
|
|
| pinopineta wrote: |
| Code: |
pineta pino # hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 17542 MB in 2.00 seconds = 8779.71 MB/sec
Timing buffered disk reads: 256 MB in 3.02 seconds = 84.88 MB/sec |
|
It looks like the bottleneck is you external drive, not the USB3 connection. You can't really expect better from a 7.2k 2.5" drive.
Also, this is certainly much faster than USB2 would be. I don't think I've ever seen a USB2 device go over ~35MB/s. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 29985 Location: 56N 3W
|
Posted: Fri Jun 22, 2012 6:26 pm Post subject: |
|
|
pinopineta,
is the speed readiging from the cache RAM in the drive. The mechanical parts of the drive are not involved in this.
is the sequential read sprred from the outside edge of the platter. Thats as good as it gets. Thats the head/platter data rate limit. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
wcg Guru

Joined: 06 Jan 2009 Posts: 554
|
Posted: Sat Jun 23, 2012 1:04 am Post subject: |
|
|
| Quote: | | Code: |
4978.133197] sd 6:0:0:0: [sdb] No Caching mode page present
[ 4978.133199] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 4978.134202] sd 6:0:0:0: [sdb] No Caching mode page present
[ 4978.134206] sd 6:0:0:0: [sdb] Assuming drive cache: write through
|
|
Some kernel discussion last week indicated that the opposite is
true, that most drives where the caching mode page is not
present are shipped with the caching mode default set to write back.
(Not specifically USB drives, this was in the context of ATA drives,
including SATA, which is probably what USB drives are under the covers.)
There was discussion of a change to some kernel subsystem to assume
that the drives are in write-back mode if the caching mode page is not present.
("When in doubt, flush the drive cache." Apparently there is a low-level scsi
command for this. I wonder if it is a noop in the firmware of drives that
lack a caching mode page.)
"Consumers do not need enterprise level data integrity."
What, this is a drive for an Xbox? Sheesh.
edit:
I did not mean to insult the OP's drive particularly, but my
opinion of USB firmware in general is low. I think too often manufacturers
view this stuff as consumer junk. ("Real users would be backing up to
an NAS box with enterprise sas drives, for a lot more money.") I mean,
who ships a drive with a missing caching mode page? ("Windows users
would not notice.") _________________ TIA |
|
| Back to top |
|
 |
pinopineta n00b

Joined: 07 Jun 2006 Posts: 29 Location: Torino
|
Posted: Thu Jun 28, 2012 10:52 am Post subject: |
|
|
| NeddySeagoon wrote: | pinopineta,
is the speed readiging from the cache RAM in the drive. The mechanical parts of the drive are not involved in this.
is the sequential read sprred from the outside edge of the platter. Thats as good as it gets. Thats the head/platter data rate limit. |
So.. what could be the benefit to buy an USB3 hard drive?
It's quite similar to an usb2 hard drive...
The usb3 port of my laptop is not useful if I can use quite to 10x usb2 ..
Usb3 specs say that speed can reach some Gbits/s of transfer rate! _________________ pinopineta@hotmail.com
'cause nothin' lasts forever |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 29985 Location: 56N 3W
|
Posted: Thu Jun 28, 2012 9:07 pm Post subject: |
|
|
pinopineta,
A USB3 2.5" rotating hard drive cannot deliver data fast enough to justify USB3 ... but it looks good in the glossy sales brouchers.
On the other hand, a 2.5" SSD can sustain 500Mb/sec, which needs something much better than USB2
It all depends on what you put at the end of your USB3. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
wcg Guru

Joined: 06 Jan 2009 Posts: 554
|
Posted: Tue Jul 03, 2012 6:47 am Post subject: |
|
|
| Quote: | | It all depends on what you put at the end of your USB3. |
The bit about the missing caching mode page and whether the drive
cache is in write-through or write-back mode depends on that, too.
The USB Storage driver is not simply being ignorant here. All it sees
is "a USB Storage block device". It does not know whether that
device is rotating media (a traditional hard drive, like the OP's
Passport drive) or a USB stick or an SD memory card or Compact
Flash card or whatever. Only the actual rotating media will likely
have a drive cache.
The USB Storage driver asks for the caching mode page and gets
back "not found" from the USB firmware on the device. What is
it supposed to think? "Oh, this is probably flash memory. Of course
it is write-through, it does not even have a drive cache."
(I still think the firmware is crap. It looks like the manufacturer
spliced the firmware from USB flash memory onto the firmware of
an ATA drive and simply ignored the drive's cache mode, so that
they would not have to modify the USB firmware and debug the
resulting firmware mods. Who cares whether the user wants
the drive in write-through or write-back mode.) _________________ TIA |
|
| Back to top |
|
 |
|