Re: mass storage behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 Oct 2015, Alan Stern wrote:
> On Mon, 5 Oct 2015, Paul Jones wrote:
>
>>> Increasing the max_sectors_kb value, on the other hand, might remove
>>> overhead by allowing a higher percentage of the transfer to consist of
>>> real data as opposed to CBW and CSW packets.  This depends to some
>>> extent on other factors (such as whether the memory pages are
>>> contiguous, allowing for larger transfers), but it can't hurt.
>>
>> I tried changing the max_sectors_kb to 64 with 64k block size in dd and it’s transferring at the same \
> speed.
>
> That's a decrease, not an increase.  Try changing it to 1024 or more.
>
>> I verified using usbmon and it then indeed requests 64k in each request.
>> Increasing the dd block size to 240k doesn’t change the transfer speed either, and it keeps using \
>> alternating 120k/8k requests. Increasing the dd block size to 1M doesn’t change the transfer speed \
>> either, although I get sequences of 2x 120k followed by 1x 16k requests.
>
> The dd block size makes no difference at all, because the kernel
> aggregates the requests from dd.

In my experience, you need to do at least the following to get max
performance from the mass storage gadget:

- Use Windows 8 or higher on the host. It's much faster than Linux.
- Put the backing file for the mass storage gadget on a tmpfs.
- Increase FSG_BUFLEN (in
drivers/usb/gadget/function/storage_common.h) to at least 128K.

-- 
Paul
--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux