Hi All,
I downloaded a 4mb file on a USB device using the bulk endpoint of 64 bytes communicating on full speed with the host. It took about 10.3 seconds to download the data. So the speed acheived was app 3.1 Mbits/secs. But the specs say full speed is of 12Mbits/sec. Where is it eating up the bandwidth ? Why cannot it be any faster ?
Note: I passed the entire 4mb data to the driver.
You are writing the data to the device? What is the device using for
storage? If it is flash the write time to the chip could be slowing
you down. Data will only be sent to the device as fast as it can
receive it so you will need to verify if the device is NAKing OUT
transactions. Getting a bus analyzer and looking at the transactions
is usually a good first step.
Jeremy
On Fri, Feb 20, 2009 at 9:35 AM, wrote:
> Hi All,
> I downloaded a 4mb file on a USB device using the bulk endpoint of 64 bytes communicating on full speed with the host. It took about 10.3 seconds to download the data. So the speed acheived was app 3.1 Mbits/secs. But the specs say full speed is of 12Mbits/sec. Where is it eating up the bandwidth ? Why cannot it be any faster ?
>
> Note: I passed the entire 4mb data to the driver.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
No, its not a storage device. Its a diagnostic device. I checked the USB logs using an analyzer and found that the device was not NACKing. What could be the reason for not getting the theoretical throughout of 12Mbps ? Yes, i am dumping the entire 4mb of data to the usbsamp driver.
xxxxx@gmail.com wrote:
I downloaded a 4mb file on a USB device using the bulk endpoint of 64 bytes communicating on full speed with the host. It took about 10.3 seconds to download the data. So the speed acheived was app 3.1 Mbits/secs. But the specs say full speed is of 12Mbits/sec. Where is it eating up the bandwidth ? Why cannot it be any faster ?
Note: I passed the entire 4mb data to the driver.
It could be many things. Is the driver chopping the request up into
smaller pieces, or is it submitting a single 4MB URB?
There is a certain amount of overhead in USB. Some of the bandwidth is
reserved for control requests (about 10%). If you have a USB mouse or
keyboard, they use interrupt pipes which reserve some of the bandwidth,
even if not used. If you have USB audio, that takes a BIG chunk. Bulk
pipes are lowest priority – they get whatever is left over. If you are
plugged into a hub, that costs you as well. Plus, some USB host
controllers just suck.
We have occasionally been able to achieve as much as 8 Mbps on a
full-speed bulk pipe for short periods. It’s worse at high-speed. The
theoretical max is 60 MB/s, but we’ve never beaten 45, and we can only
do that with certain brands of host controller.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Yes, the driver is segmenting the request into 64bytes chunks. Is it somewhere documented that the max speed cannot be reached ? If i am reaching a speed of 3.3mbps is it the max that can be reached ?
xxxxx@gmail.com wrote:
Yes, the driver is segmenting the request into 64bytes chunks.
That’s silly, because each URB has to be acknowledged. Just submit a
single 4MB URB. The host controller driver will Do The Right Thing.
Is it somewhere documented that the max speed cannot be reached ? If i am reaching a speed of 3.3mbps is it the max that can be reached ?
I believe I already told you that we were able to achieve 8 Mbps, but
part of it depends on the quality of the host controller.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Thanks Tim, actually i was using the usbsamp example as my driver. Internally it breaks down the request into smaller segments. Hope there wont be any problem if i comment out the segmentation code.