On Sat, 23 Sep 2006, Frederick Shotton wrote: > Sorry for confusing packets for URBs. I don't think it is a hardware limit > because Windows gets 10 MB/sec on the random 8KB reads versus 3.4 MB/sec for > Linux, no disk cache involved as I'm opening the file to the raw device, in > Linux to /dev/sda, in Windows to \\.\PHYSICALDRIVE3.
I don't know how Windows works internally, but in Linux, reading from /dev/sda does _not_ bypass the page cache. Hence that 10 MB/sec value is suspect. You should try running your test immediately after plugging in the device, so that the cache will be empty. You said before that bypassing all the software layers with libusb gave you a transfer rate of 3.1 MB/s for random access. I don't see how you could hope to improve that rate when adding in all the filesystem overhead. And if that really is the hardware limit for the device, I don't see how any OS could get a higher rate. > I could try readv to > see if that helps but it won't help my application as I don't know which > block to read beforehand, it is a B-tree lookup pattern. Is it possible the > performance difference comes from having two 4 KB bulk-in data URBs versus > a single 8 KB bulk-in data URB, and maybe having the second 4KB bulk-in data > URB submitted before receiving the first 4KB bulk-out URB? No, it's not possible. The difference between one URB vs. two will be extremely small, just a little software overhead. One the USB bus both sequences would appear the same. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users