Hi Alan,
Thanks for your response. Comments below.
Alan Stern wrote:
On Tue, 16 May 2006, Adisorn Ermongkonchai wrote:
Hi,
First of, I am very new to USB. My project is wireless related (not
USB) and I am in the process of testing the Linux (kernel 2.6.16.15)
wireless performance using wireless usb devices. I use D-Link USB
(54Mbps) device as my testing device. The max performance of wireless
transmission is roughly around 25Mbps. I am currently using
2 wireless channels (chan 6 and 11) without encryption. My tests
are as followed.
Using 4 PCs called PC1, PC2, PC3, and PC4, PC1 and PC2
are connected with each other in Ad-Hoc mode channel 6.
PC3 and PC4 are connected using channel 11 also Adhoc mode.
The performance is as expected. Each pair is transmitted at
expected speed around 20-25Mbps. I use "ttcp" to test its speed.
This test is to ensure that channel 6 and 11 do not interfere with
each other and they seemed that they do not interfere with each
other.
But when I used 2 PC's with 2 channels per PC. again in
Adhoc mode and ran ttcp on both channels simultaneously,
the speed of each channel went down by 1/3 to 1/2 of the
expected speed. I suspect that it is USB related.
Do you have any evidence to back up this suspicion? For example, what
happens if you run with 1 channel per PC but with a second USB device
(like a flash disk) installed and in use?
I did experiment as you've suggested by adding USB flash disk with 1
channel.
The USB flash disk doesn't degrade the performance of the wireless. I
did try
read/write the USB flash drive and transmit onto wireless at the same time,
the speed of wireless device is still at its expected value
(20-25Mbps). Then
I remove USB flash drive and add another channel and try again. Same
result,
speed of each channel is down'ed by half. That means that the wireless
driver
is not sending out fast enough, humm!!!
BTW, I don't have any other devices running on the USB port,
just the 2 wireless USBs.
So I dig into the D-link USB driver (open source by Ralink) and
found that it uses Bulk transfer mode. And the code seems to
be reasonable. It calls "usb_fill_bulk_urb" with "usb_sndbulkpipe"
and "complete" callback function and then calls "usb_submit_urb"
to do the transmit. When "complete" callback is called, the
transmit procedure is repeated if there are still packets in the
queue.
I check the "wMaxPacketSize", it is already set to 64 when the
probe function is called. Is there anything that I could do to
enhance the performance.
Which wMaxPacketSize did you check? Is it the value for endpoint 0 or the
value for one of the bulk endpoints?
I browse at the driver code, endpoint 0 is for control (setting
registers in the device)
and endpoint 1 is for data transmission/reception. I looked at both
endpoints and both
are set to 64.
BTW, I don't have USB analyzer to look at the USB bus. Any
suggestions are appreciated. Hopefully, there is some place
that I could tweak in the kernel to improve the performance.
The kernel's USB stack is already tuned for maximum performance.
I will continue to look at the driver code to see if I can spot
anything. I am currently
using rt2570 driver from Ralink (http://rt2x00.serialmonkey.com) and
device I use is
D-Link DWL-G122. I will also educate myself more about USB.
Alan Stern
Thanks,
Adisorn.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel