Comment 68 for bug 500069

Revision history for this message
Ming Lei (tom-leiming) wrote : Re: [Bug 500069] Re: USB file transfer causes system freezes; ops take hours instead of minutes

On Sun, Apr 1, 2012 at 1:15 PM, adri58 <email address hidden> wrote:
https://bugs.launchpad.net/bugs/500069/+attachment/2980204/+files/1u.mon.out

adri58, thanks for your post.

From your usbmon trace, I found that it may take about ~22ms averagely
to complete writing 120KB[1] into your usb mass storage, so the max write
performance is about 5.3MB/sec, for example:

/*send WRITE cmd from host to usb mass storage device*/
ffff880037674d40 905709519 S Bo:2:007:2 -115 31 = 55534243 9f080000
00e00100 00000a2a 00000457 c60000f0 00000000 000000
ffff880037674d40 905709611 C Bo:2:007:2 0 31 >

/*write 120KB data to usb mass storage device*/
ffff8801139ac080 905709619 S Bo:2:007:2 -115 122880 = 831683e5
c00e55d7 83e9c00e 95c1f2bf fb0300c6 81908c93 c98144a9 5980441a
ffff8801139ac080 905731863 C Bo:2:007:2 0 122880 >

/*read the status of writing operation*/
ffff880037674d40 905731871 S Bi:2:007:1 -115 13 <
ffff880037674d40 905733112 C Bi:2:007:1 0 13 = 55534253 9f080000 00000000 00

The above 3 steps are an intact procedures to write 120KB into usb
mass storage device.

Also looks no any error information is found in your trace, so your problem
should be that the usb mass storage is slow device, especially wrt. writing
performance.

I suggest you to do some tests on windows to see if you can get same
performance with ubuntu.

[1], 120KB is the max transfer unit per scsi command, also it is the most
frequent transfer unit in linux usb mass storage read/write.

Thanks
--
Ming Lei