On Sat, 10 Oct 2015, Paul Jones wrote: > >> Why is Windows so much faster? Or to put it another way, why is Linux > >> slow? How can we improve things? > > > > I don't know. We were doing our performance demos using Windows, so we > > never looked into why Linux was slower. But I do know the Microsoft > > engineers put some effort into tuning their stack for good performance > > at USB 3.0 speeds. I don't think anyone has done that for Linux yet. > It seems that Mac OSX is faster when using a file system on an emulated device. > dd directly to the block device on my Mac gives me around 137MB/s, whilst copying data onto a mounted filesystem (also with dd) runs at over 180MB/s. I don't see how this comment is relevant to the question at hand, namely, why does the mass-storage gadget run faster when attached to a Windows host than when attached to a Linux host. I also don't see how "an emulated device" fits in here. In both tests, you copied data to a block device: once directly and once through the filesystem. Nothing was emulated. Finally, are you sure you are seeing the actual throughput and not just the rate of copying into a page cache? It would be better to test using reads instead of writes, because a read can't complete before the data is retrieved from the device. Getting back to the earlier problem, it's true there are some things we could do in usb-storage to speed up transfer rates. We don't have to wait for the CBW to complete before we start the data phase, and we don't have to wait for the data phase to complete before we submit the CSW URB (although this can get tricky if the device ends a write transfer with a STALL). It's not clear how much these changes would help, but they wouldn't hurt. 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