views:

154

answers:

2

I developed a device driver for a USB 1.1 device onr Windows 2000 and later with Windows Driver Model (WDM).

My problem is the pretty bad Tx performance when using 64byte bulk transfers. Depending on the used USB Host Controller the maximum packet throughput is either 1000 packets (UHCI) or 2000 packets (OHCI) per seconds. I've developed a similar driver on Linux Kernel 2.6 with round about 5000 packets per second.

The Linux driver uses up to 10 asynchronous bulk transfer while the Windows driver uses 1 synchronous bulk transfer. So comparing this makes it clear while the performance is so bad, but I already tried with asynchronous bulk transfers as well without success (no performance gain).

Does anybody has some tips and tricks how to boost the performance on Windows?

A: 

What kind of throughput are you getting? USB 1.1 is limited to about 1.5 Mbit/s

It might be a limitation that you'll have to live with, the one thing you must never do is to starve the system for resources. I've seen so many poor driver implementations where the driver is hogging system resources in utter failure to increase its own performance.

My guess is that you're using the wrong API calls, have you looked at the USB samples in the Win32 DDK?

John Leidegren
Isn't USB 1.1 theoretically limit at 12MBit/s? Under Linux we reach with the same device up to 5 times more packets/s. The packet size isn't 64byte (maximum) but that is the same for Linux. I'll have a look at the examples. Thanks.
Seika
A: 

I've now managed it to speed up sending to about 6.6k messages/s. The solution was pretty simple, I've just implemented the same mechanism as in the Linux driver.

So now I'm scheduling up to 20 URBs at once, at what should I say, it worked.

Seika