Re: [gentoo-user] Re: [OT] Disappointing USB3 performance

2011-10-24 Thread Florian Philipp
Am 24.10.2011 22:02, schrieb Grant Edwards:
 On 2011-10-24, walt w41...@gmail.com wrote:
 
 I just bought an add-on USB3 adapter and outboard USB3/sata docking
 station, and I've been comparing the performance with my old e-sata
 outboard docking station.  Not so good :(

 After getting some unreliable results with hdparm, I settled on
 copying one 3GB file from one partition of the outboard drive to
 another partition of the same drive.  These results are highly
 reproducible, and favor e-sata over USB3 by a large margin.

 Over at least six trials on each docking station I consistently get
 105 seconds for USB and 84 seconds for e-sata, a 5:4 ratio in favor
 of e-sata.
 
 Not surprising.  Did you expect that adding a gateway device to the
 communication path and another protocol layer on top of SATA would
 make things faster?
 
 I used the same hard disk and the same pci-e slot in the same
 minimally-loaded machine for all the runs, and got very consistent
 results every time.

 Basically, the USB3/sata docking station gets the same throughput as
 the older sata 1 drives connected to the onboard pci sata controller,
 which is still pretty respectable for an outboard drive, I think.
 
 Yep, SATA performs the same as SATA. AFAIK, eSATA and SATA are
 identical apart from the physical specs for the connector, a few minor
 voltage level differences (to imporove noise tolerance), and hot-plug
 support.


Normal SATA also offers hotplug. Usually works, too.

 So, has anyone out there done similar tests on USB3 drives yet?
 
 There are disk drives that talk USB3 natively and aren't just using
 USB-SATA gateways?
 

Well, there is USB Attached SCSI (CONFIG_USB_UAS in the kernel). It
supports command queuing and works for USB-2.0 and 3.0 (but has
additional software overhead for USB-2.0). I've not yet seen a
compatible device, though.

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Re: [OT] Disappointing USB3 performance

2011-10-24 Thread Paul Hartman
On Mon, Oct 24, 2011 at 4:31 PM, Grant Edwards
grant.b.edwa...@gmail.com wrote:
 On 2011-10-24, Florian Philipp li...@binarywings.net wrote:
 Am 24.10.2011 22:02, schrieb Grant Edwards:
 On 2011-10-24, walt w41...@gmail.com wrote:

 I just bought an add-on USB3 adapter and outboard USB3/sata docking
 station, and I've been comparing the performance with my old e-sata
 outboard docking station.  Not so good :(

 After getting some unreliable results with hdparm, I settled on
 copying one 3GB file from one partition of the outboard drive to
 another partition of the same drive.  These results are highly
 reproducible, and favor e-sata over USB3 by a large margin.

 Over at least six trials on each docking station I consistently get
 105 seconds for USB and 84 seconds for e-sata, a 5:4 ratio in favor
 of e-sata.

 Not surprising.  Did you expect that adding a gateway device to the
 communication path and another protocol layer on top of SATA would
 make things faster?

 I used the same hard disk and the same pci-e slot in the same
 minimally-loaded machine for all the runs, and got very consistent
 results every time.

 Basically, the USB3/sata docking station gets the same throughput as
 the older sata 1 drives connected to the onboard pci sata controller,
 which is still pretty respectable for an outboard drive, I think.

 Yep, SATA performs the same as SATA. AFAIK, eSATA and SATA are
 identical apart from the physical specs for the connector, a few minor
 voltage level differences (to imporove noise tolerance), and hot-plug
 support.

 Normal SATA also offers hotplug. Usually works, too.

 I read somewhere that not all controllers support hotplug on
 internal connectors, but I can't personally attest to having found
 one that didn't.

 So, has anyone out there done similar tests on USB3 drives yet?

 There are disk drives that talk USB3 natively and aren't just using
 USB-SATA gateways?

 Well, there is USB Attached SCSI (CONFIG_USB_UAS in the kernel). It
 supports command queuing and works for USB-2.0 and 3.0 (but has
 additional software overhead for USB-2.0). I've not yet seen a
 compatible device, though.

 Interesting.  Is USB3 peer to peer like SCSI and Firewire, or is it
 the same master/slave poll/response scheme that has always crippled
 USB?  Doing SCSI via a poll/response transport protocol seems like it
 would lose most of the advantages of SCSI.

IIRC USB3 is interrupt-driven instead of constantly polling the device.



Re: [gentoo-user] Re: [OT] Disappointing USB3 performance

2011-10-24 Thread Michael Mol
On Oct 24, 2011 7:21 PM, walt w41...@gmail.com wrote:

 On 10/24/2011 10:28 AM, walt wrote:
  ...
  Over at least six trials on each docking station I consistently
  get 105 seconds for USB and 84 seconds for e-sata, a 5:4 ratio
  in favor of e-sata/sata over USB3/sata...

 Wow, lots of great answers, guys, thanks.  Enough material to give
 me lots more questions to ask you :)

 Like, for example, in theory the raw bit-rate for USB3 is more than
 enough to keep up with any existing consumer hard drive, right?  The
 speed of usb/sata protocol translation should be very fast compared
 to the speed of a spinning mechanical disk (I think?)

 Now, lack of DMA is another story for hard disks, certainly.  Here's
 where my ignorance of hardware limits my thinking:

 AFAIK the device driver *always* sits between the disk drive and the
 DMA hardware, doesn't it?

DMA means a device is told where in the system's address space it may write
to, and it writes directly to that place without further CPU involvement.
Since drivers run on the CPU, the drivr isn't a go-between.

When the CPU *is* involved in the passing of bits around, things slow down.
IIRC, that's called PIO--programmed IO.


Re: [gentoo-user] Re: [OT] Disappointing USB3 performance

2011-10-24 Thread Allan Gottlieb
On Mon, Oct 24 2011, Michael Mol wrote:

 On Oct 24, 2011 7:21 PM, walt w41...@gmail.com wrote:

 Now, lack of DMA is another story for hard disks, certainly.  Here's
 where my ignorance of hardware limits my thinking:

 AFAIK the device driver *always* sits between the disk drive and the
 DMA hardware, doesn't it?

 DMA means a device is told where in the system's address space it may write
 to, and it writes directly to that place without further CPU involvement.
 Since drivers run on the CPU, the drivr isn't a go-between.

 When the CPU *is* involved in the passing of bits around, things slow down.
 IIRC, that's called PIO--programmed IO.

Correct.  DMA stands for direct memory access; the device has direct
access to the memory.  PIO is indeed the name when the CPU acts as a go
between.

allan



Re: [gentoo-user] Re: [OT] Disappointing USB3 performance

2011-10-24 Thread Adam Carter
USB does use DMA. Check the kernel source doco Documentation/usb/dma.txt