On Sat, 23 Sep 2006, Frederick Shotton wrote: > Using async brought the performance of random access 8KB reads up 26% to > about 4.3 MB/sec. Still a long way off the Windows speed. > > -fred > > > > Frederick Shotton wrote: > > > In conducting tests on a 4GB USB 200x memory stick, I find that using > Linux > > > 2.6.17 reading 8KB blocks I get 12MB/sec for sequential access and > 3MB/sec > > > for random access. The interesting thing is that under Windows with the > same > > > memory stick I get 10MB/sec for both sequential and random access. My > goal > > > is to get the fastest random access speed under Linux. > > > > > > I have delved into the internals of the usbstorage driver and tried > various > > > settings such as the GO_SLOW flag, but none of them help. I have also > tried > > > bypassing the usbstorage driver using libusb and got the same > performance > > > numbers. > > > > > > Any ideas? > > > > > How do you mount it? you probably have the sync flag.. if you use > > async it will be much faster. > > > > mount -o async /dev/usbstick /mnt/point
Most of the performance you're worried about is determined by the higher layers of software, not by the USB stack. That's why the mount flags make such a big difference. Another aspect of the difference has to do with how you program the random access test. Do you use lots of read commands? Have you tried using readv instead? The results will also depend on how large the individual data blocks are. Linux works most efficiently when you transfer blocks whose size is a multiple of 4 KB. If you want _really_ detailed timing information, use the usbmon facility (instructions in the kernel source file Documentation/usb/usbmon.txt). 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