On Fri, 5 Jun 2015, Mark Hills wrote: > On Fri, 5 Jun 2015, Alan Stern wrote: > > > On Fri, 5 Jun 2015, Mark Hills wrote: > > > > > I have a new USB 3.0 hard drive which appears to be throttled at > > > approx 5Mbyte/sec. > > > > > > Is there a mystery kernel option that is required to enable full > > > performance on these new drives? > > > > > > I have tried changing following: > > > > > > * Switching onboard USB 2.0 interfaces for a completely new USB 3.0 > > > interface (xhci_pci) > > > > > > * Enabling and disabling the "USB attached SCSI" CONFIG_USB_UAS > > > > > > But drive performance stays limited at 5Mbyte/sec. > > > > > > I've settled on using the USB 3.0 interface, and the dmesg (below) reports > > > "SuperSpeed" and looks ok. > [...] > > By any chance, do you mount the filesystem with the "-o sync" option? > > That will slow things _way_ down. > > It's not -- and also I can reproduce the results with no file system; > just a 'dd' to /dev/sdc1. > > > If that's not the answer, try acquiring usbmon traces on the fast and > > slow systems for comparison (see the instructions in > > Documentation/usb/usbmon.txt.). > > Thanks for this -- I made some progress. > > I also tested reads this time which were ok (150Mbyte/sec), it's only > writes that appear to be throttled. > > I have a sample of reads and writes from both systems below. I disabled > 'uas' for the tests, droped caches etc. and used 'dd bs=1M' to the > partition. > > The most striking thing is that the affected system consistently uses ~4KB > URBs ("Len: 1"?) for writes. > > Whereas all the other requests seem to be a majority ~60KB URBs and "Len: > 30" What did you use for this monitoring? It isn't usbmon output. > I can imagine this accounts for the lack of throughput, but not whether > it's the cause or a symptom. It must be a symptom -- that is, it can't be the ultimate cause. There must be a reason why the write URBs are so small; the default limit is 120 KB. > The lsusb output for the device is identical on both systems (see below) > > I imagine something lies in the code that generates the write requests, > but I am starting from scratch here. I'd be greateful if you (or anyone > else) has information that could point me to the next step. I'm puzzled. Have you checked /sys/block/sdc/queue/max_sectors_kb? Whatever the reason is, it doesn't seem to be connected with the USB stack. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html