On Tue, 15 Mar 2005, Daniel Miller (IMI) wrote: > We have a USB mass-storage tester running on Linux 2.6.7. Our > application uses libusb (11/18 distribution). Some of our customers > have been reporting that our system reports lower throughputs than a > Windows system running Sandra 2004. To analyze the situation, we ported > our application to Windows XP (no minor task, that), and indeed we > report read/write speeds that are comparable with Sandra's reports. > Typical differences for one particular device are: > > Windows: write 17.5 MB/sec, read 21.5 MB/sec > > Linux: write 13.5 MB/sec, read 17MB/sec > > This is a serious deficiency in the linux application. I do my timing > immediate around the calls the the bulk_read and bulk_write functions, > on both platforms, so none of our application overhead is included in > the timing. Why are the linux results so much slower?? Is there > anything I can do to speed things up??
It's kind of hard to say why your Linux code behaves the way it does without knowing anything about how it works. :-) The way to get maximum throughput is to use asynchronous transfers (USBDEVFS_SUBMITURB and USBDEVFS_REAPURB -- I don't know what the libusb equivalent is) and to submit multiple URBs at once, so there's always a request in the queue to keep the hardware busy. You should try to maintain maybe 40 ms worth of data in the queue; at high speed that amounts to 2 - 3 MB. Bear in mind also that usbfs won't let you submit more than 32 KB (I think -- maybe it's 16 KB or 64 KB) per URB. Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
