2011-04-13 16:26:04

by Daniel Halperin

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?

Ugh! Couldn't you configure the stupid mailing list filter to only
drop rich text mails that have [PATCH or [RFC or [RFT in the subject,
e.g.? Original mail below.

(sorry for the resend, Justin and Ivo).

Dan

On Wed, Apr 13, 2011 at 9:23 AM, Daniel Halperin
<[email protected]> wrote:
>
> On Wed, Apr 13, 2011 at 9:01 AM, Justin Piszcz <[email protected]> wrote:
>>>
>>> Can you try disabling powersaving?
>>> iwconfig wlan0 power off
>>>
>> Wow! That was it, now its interactive again.
>>
>> 64 bytes from wireless-host (192.168.1.2): icmp_req=1 ttl=64 time=0.581 ms
>> 64 bytes from wireless-host (192.168.1.2): icmp_req=2 ttl=64 time=0.647 ms
>>
>> Thanks, so its recommend to keep this off then, can that be set as the driver default?
>>
>
> That's a bad idea, what you're seeing is likely completely a red herring.?Wi-Fi power saving mode saves energy by putting the RF hardware most of the time. This is a Good Thing.
> Power save is designed to kick in only when the load is very slow; the client's network stack should automatically disable power save during times of high load, e.g., during a download or a VoIP call. You should run some tests to see if this is actually occurring; there may be a bug in the rtl implementation.
> The real problem here is that your ping test has invalid assumptions. One packet/second is not enough load to disable Wi-Fi power save, so you should not see interactive ping times. Again, this is a good thing and something I doubt you want to disable! (Assuming that RTL's implementation isn't fundamentally broken elsewhere) It certainly should NOT be the driver default.
> Try again with sudo ping -i 0.01 -s 1400 (e.g., to ping with large packets every 10 ms); this should probably trigger the logic that automatically disables the power saving mode. Or try pinging while doing a 1 Mbit UDP transfer (e.g., with iperf).
> Dan


2011-04-13 18:37:34

by Daniel Halperin

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?

On Wed, Apr 13, 2011 at 10:57 AM, Justin Piszcz <[email protected]> wrote:
> Hi,
>
> When powersave is enabled, it is very jumpy, I've used satellite comms
> before
> and (~600ms-1200ms was more smooth) as it did not jump around as much. ?The
> application is just a standalone desktop with minimal activity for the
> majority
> of the time, maybe thats why..
>
> With powersave disabled, I now see 0% packet loss (802.11n) and low ping
> times, this looks like the proper solution for the wireless USB device I
> am using. ?By the way, is it possible/are there wireless USB devices out
> there
> that support wake on wireless lan (WOWL?
>
> Your ping command with power off:
> 1408 bytes from server (192.168.1.2): icmp_req=539 ttl=64 time=1.07 ms
> 1408 bytes from server (192.168.1.2): icmp_req=540 ttl=64 time=1.31 ms
> 1408 bytes from server (192.168.1.2): icmp_req=541 ttl=64 time=1.07 ms
> 1408 bytes from server (192.168.1.2): icmp_req=542 ttl=64 time=1.26 ms
>
> Your ping command with power on:
> 1408 bytes from server (192.168.1.2): icmp_req=649 ttl=64 time=1.80 ms
> 1408 bytes from server (192.168.1.2): icmp_req=650 ttl=64 time=1.85 ms
> 1408 bytes from server (192.168.1.2): icmp_req=651 ttl=64 time=2.86 ms
> 1408 bytes from server (192.168.1.2): icmp_req=652 ttl=64 time=1.46 ms
>
> You are correct, if there is a lot of traffic, its good, but if the system
> is relatively idle and all that's going on is an SSH session, there is
> horrible
> latency.

Gotcha. I might still look around in the network stack and/or driver
and see what the time constants are. For instance:

(1) What is the AP's beacon period and DTIM? Typical values are 100
TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
wakeup) which should imply a mean of 100 and max of 200 ms delay even
on pings.

(2) How long does the client wait after waking up to go back to sleep?
It should be at least a few seconds. For ssh, then, you should see
something like a 100-200 ms delay for the first key and then nothing
at all unless you stop typing for a bit.

I'm SSHing over a Wi-Fi link that uses power save right this second,
and have for years. It's not generally an issue, I suspect something
worse is going on.

Dan

2011-04-14 05:39:02

by Igor Plyatov

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?

Dear Daniel,
> On Wed, Apr 13, 2011 at 1:13 PM, Justin Piszcz<[email protected]> wrote:
>>> (1) What is the AP's beacon period and DTIM? Typical values are 100
>>> TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
>>> wakeup) which should imply a mean of 100 and max of 200 ms delay even
>>> on pings.
>> I am using a WNDR3700 with default settings in terms of beacons/etc. No
>> issues with any device (laptop, computer, etc (in windows)), I have two
>> wireless USB adapters (bought two) and in Windows, no problems, I don't
>> think
>> it is the WNDR3700. As far as linux/wpa-supplicant, using default settings.
> Not enough info. What does "iw dev wlan1 scan dump" (it might not be
> wlan1 for you) say for "beacon interval"?
>
> Does anyone know how to get the DTIM period out of iw?
>
# iw dev wlan0 scan dump
BSS 74:ea:3a:e4:fa:6e (on wlan0) -- associated
TSF: 499843461 usec (0d, 00:08:19)
freq: 2442
beacon interval: 100
capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
signal: -51.00 dBm
last seen: 510 ms ago
Information elements from Probe Response frame:
SSID: mynet2
Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
DS Parameter set: channel 7
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: (0x0000)
ERP: <no flags>
Extended supported rates: 24.0 36.0 48.0 54.0
WMM: * Parameter version 1
* u-APSD
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec
HT capabilities:
Capabilities: 0x104e
HT20/HT40
SM Power Save disabled
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
WPS: * Version: 1.0
* Wi-Fi Protected Setup State: 2 (Configured)
* Response Type: 3 (AP)
* Unknown TLV (0x1047, 16 bytes): 00 00 00 00 00 00 10 00 00
00 74 ea 3a e4 fa 6e
* Manufacturer: TP-LINK
* Model: TL-WR1043N
* Model Number: 1.0
* Serial Number: 1.0
* Primary Device Type: 6-0050f204-1
* Device name: Wireless Router TL-WR1043N
* Config methods: Ethernet, Label, PBC
* RF Bands: 0x1

>>> (2) How long does the client wait after waking up to go back to sleep?
>>> It should be at least a few seconds. For ssh, then, you should see
>>> something like a 100-200 ms delay for the first key and then nothing
>>> at all unless you stop typing for a bit.
>> It lags with each word I type, it is terrible. If I run something like
>> dmesg or ps auxww, the entire session freezes for 5-10 seconds before it
>> comes back.
> Sorry; I meant what is the software stack configured to do? Do some
> looking around.
What do you mean here?

Best regards!
--
Igor Plyatov

2011-04-14 05:17:15

by Igor Plyatov

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?

Hi!

> On Wed, 13 Apr 2011, Daniel Halperin wrote:
>
>> On Wed, Apr 13, 2011 at 10:57 AM, Justin Piszcz
>> <[email protected]> wrote:
>>> Hi,
>>>
>>> When powersave is enabled, it is very jumpy, I've used satellite comms
>>> before
>>> and (~600ms-1200ms was more smooth) as it did not jump around as
>>> much. The
>>> application is just a standalone desktop with minimal activity for the
>>> majority
>>> of the time, maybe thats why..
>>>
>>> With powersave disabled, I now see 0% packet loss (802.11n) and low
>>> ping
>>> times, this looks like the proper solution for the wireless USB
>>> device I
>>> am using. By the way, is it possible/are there wireless USB devices
>>> out
>>> there
>>> that support wake on wireless lan (WOWL?
>>>
>>> Your ping command with power off:
>>> 1408 bytes from server (192.168.1.2): icmp_req=539 ttl=64 time=1.07 ms
>>> 1408 bytes from server (192.168.1.2): icmp_req=540 ttl=64 time=1.31 ms
>>> 1408 bytes from server (192.168.1.2): icmp_req=541 ttl=64 time=1.07 ms
>>> 1408 bytes from server (192.168.1.2): icmp_req=542 ttl=64 time=1.26 ms
>>>
>>> Your ping command with power on:
>>> 1408 bytes from server (192.168.1.2): icmp_req=649 ttl=64 time=1.80 ms
>>> 1408 bytes from server (192.168.1.2): icmp_req=650 ttl=64 time=1.85 ms
>>> 1408 bytes from server (192.168.1.2): icmp_req=651 ttl=64 time=2.86 ms
>>> 1408 bytes from server (192.168.1.2): icmp_req=652 ttl=64 time=1.46 ms
>>>
>>> You are correct, if there is a lot of traffic, its good, but if the
>>> system
>>> is relatively idle and all that's going on is an SSH session, there is
>>> horrible
>>> latency.
>>
>> Gotcha. I might still look around in the network stack and/or driver
>> and see what the time constants are. For instance:
>>
>> (1) What is the AP's beacon period and DTIM? Typical values are 100
>> TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
>> wakeup) which should imply a mean of 100 and max of 200 ms delay even
>> on pings.
> I am using a WNDR3700 with default settings in terms of beacons/etc. No
> issues with any device (laptop, computer, etc (in windows)), I have two
> wireless USB adapters (bought two) and in Windows, no problems, I
> don't think
> it is the WNDR3700. As far as linux/wpa-supplicant, using default
> settings.
>
>
>>
>> (2) How long does the client wait after waking up to go back to sleep?
>> It should be at least a few seconds. For ssh, then, you should see
>> something like a 100-200 ms delay for the first key and then nothing
>> at all unless you stop typing for a bit.
> It lags with each word I type, it is terrible. If I run something like
> dmesg or ps auxww, the entire session freezes for 5-10 seconds before it
> comes back.

Yes, it's terrible. I have the same problems with ping and ssh with
latest GIT
linux on my ARM platform and two different USB Wi-Fi adapters based on
RT3070 chipset ("D-Link DWA-125" and "Qcom LR802UKN3").

>
>>
>> I'm SSHing over a Wi-Fi link that uses power save right this second,
>> and have for years. It's not generally an issue, I suspect something
>> worse is going on.
> Maybe the wireless usb adapters do not function well in Linux with
> power save
> on.
>
> I bought them awhile ago, they had the highest reviews, and in Windows,
> they did do 10-15MiB/s, in Linux, I see ~4.6MiB/s (but that was with
> power save on) about the same, 4.5MiB/s.
> http://www.amazon.com/Medialink-Wireless-Adapter-802-11n-Compatible/dp/B002RM08RE
>
>
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 23.2803 s, 4.5 MB/s
>
> Justin.

Best regards!
--
Igor Plyatov

2011-04-13 17:57:54

by Justin Piszcz

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?



On Wed, 13 Apr 2011, Daniel Halperin wrote:

> Ugh! Couldn't you configure the stupid mailing list filter to only
> drop rich text mails that have [PATCH or [RFC or [RFT in the subject,
> e.g.? Original mail below.
>
> (sorry for the resend, Justin and Ivo).
>
> Dan
>
> On Wed, Apr 13, 2011 at 9:23 AM, Daniel Halperin
> <[email protected]> wrote:
>>
>> On Wed, Apr 13, 2011 at 9:01 AM, Justin Piszcz <[email protected]> wrote:
>>>>
>>>> Can you try disabling powersaving?
>>>> iwconfig wlan0 power off
>>>>
>>> Wow! That was it, now its interactive again.
>>>
>>> 64 bytes from wireless-host (192.168.1.2): icmp_req=1 ttl=64 time=0.581 ms
>>> 64 bytes from wireless-host (192.168.1.2): icmp_req=2 ttl=64 time=0.647 ms
>>>
>>> Thanks, so its recommend to keep this off then, can that be set as the driver default?
>>>
>>
>> That's a bad idea, what you're seeing is likely completely a red herring.?Wi-Fi power saving mode saves energy by putting the RF hardware most of the time. This is a Good Thing.
>> Power save is designed to kick in only when the load is very slow; the client's network stack should automatically disable power save during times of high load, e.g., during a download or a VoIP call. You should run some tests to see if this is actually occurring; there may be a bug in the rtl implementation.
>> The real problem here is that your ping test has invalid assumptions. One packet/second is not enough load to disable Wi-Fi power save, so you should not see interactive ping times. Again, this is a good thing and something I doubt you want to disable! (Assuming that RTL's implementation isn't fundamentally broken elsewhere) It certainly should NOT be the driver default.
>> Try again with sudo ping -i 0.01 -s 1400 (e.g., to ping with large packets every 10 ms); this should probably trigger the logic that automatically disables the power saving mode. Or try pinging while doing a 1 Mbit UDP transfer (e.g., with iperf).
>> Dan
>

Hi,

When powersave is enabled, it is very jumpy, I've used satellite comms before
and (~600ms-1200ms was more smooth) as it did not jump around as much. The
application is just a standalone desktop with minimal activity for the majority
of the time, maybe thats why..

With powersave disabled, I now see 0% packet loss (802.11n) and low ping
times, this looks like the proper solution for the wireless USB device I
am using. By the way, is it possible/are there wireless USB devices out there
that support wake on wireless lan (WOWL?

Your ping command with power off:
1408 bytes from server (192.168.1.2): icmp_req=539 ttl=64 time=1.07 ms
1408 bytes from server (192.168.1.2): icmp_req=540 ttl=64 time=1.31 ms
1408 bytes from server (192.168.1.2): icmp_req=541 ttl=64 time=1.07 ms
1408 bytes from server (192.168.1.2): icmp_req=542 ttl=64 time=1.26 ms

Your ping command with power on:
1408 bytes from server (192.168.1.2): icmp_req=649 ttl=64 time=1.80 ms
1408 bytes from server (192.168.1.2): icmp_req=650 ttl=64 time=1.85 ms
1408 bytes from server (192.168.1.2): icmp_req=651 ttl=64 time=2.86 ms
1408 bytes from server (192.168.1.2): icmp_req=652 ttl=64 time=1.46 ms

You are correct, if there is a lot of traffic, its good, but if the system
is relatively idle and all that's going on is an SSH session, there is horrible
latency.

So the fix/workaround, for Debian-based distributions (if you come across
this problem):

File: /etc/network/interfaces

-- snip --

# Wireless
auto wlan0
iface wlan0 inet dhcp
wpa-ssid your-ssid
wpa-psk your-private-key
post-up /sbin/iwconfig wlan0 power off

-- snip --

Justin.

2011-04-13 20:13:06

by Justin Piszcz

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?



On Wed, 13 Apr 2011, Daniel Halperin wrote:

> On Wed, Apr 13, 2011 at 10:57 AM, Justin Piszcz <[email protected]> wrote:
>> Hi,
>>
>> When powersave is enabled, it is very jumpy, I've used satellite comms
>> before
>> and (~600ms-1200ms was more smooth) as it did not jump around as much. ?The
>> application is just a standalone desktop with minimal activity for the
>> majority
>> of the time, maybe thats why..
>>
>> With powersave disabled, I now see 0% packet loss (802.11n) and low ping
>> times, this looks like the proper solution for the wireless USB device I
>> am using. ?By the way, is it possible/are there wireless USB devices out
>> there
>> that support wake on wireless lan (WOWL?
>>
>> Your ping command with power off:
>> 1408 bytes from server (192.168.1.2): icmp_req=539 ttl=64 time=1.07 ms
>> 1408 bytes from server (192.168.1.2): icmp_req=540 ttl=64 time=1.31 ms
>> 1408 bytes from server (192.168.1.2): icmp_req=541 ttl=64 time=1.07 ms
>> 1408 bytes from server (192.168.1.2): icmp_req=542 ttl=64 time=1.26 ms
>>
>> Your ping command with power on:
>> 1408 bytes from server (192.168.1.2): icmp_req=649 ttl=64 time=1.80 ms
>> 1408 bytes from server (192.168.1.2): icmp_req=650 ttl=64 time=1.85 ms
>> 1408 bytes from server (192.168.1.2): icmp_req=651 ttl=64 time=2.86 ms
>> 1408 bytes from server (192.168.1.2): icmp_req=652 ttl=64 time=1.46 ms
>>
>> You are correct, if there is a lot of traffic, its good, but if the system
>> is relatively idle and all that's going on is an SSH session, there is
>> horrible
>> latency.
>
> Gotcha. I might still look around in the network stack and/or driver
> and see what the time constants are. For instance:
>
> (1) What is the AP's beacon period and DTIM? Typical values are 100
> TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
> wakeup) which should imply a mean of 100 and max of 200 ms delay even
> on pings.
I am using a WNDR3700 with default settings in terms of beacons/etc. No
issues with any device (laptop, computer, etc (in windows)), I have two
wireless USB adapters (bought two) and in Windows, no problems, I don't think
it is the WNDR3700. As far as linux/wpa-supplicant, using default settings.


>
> (2) How long does the client wait after waking up to go back to sleep?
> It should be at least a few seconds. For ssh, then, you should see
> something like a 100-200 ms delay for the first key and then nothing
> at all unless you stop typing for a bit.
It lags with each word I type, it is terrible. If I run something like
dmesg or ps auxww, the entire session freezes for 5-10 seconds before it
comes back.


>
> I'm SSHing over a Wi-Fi link that uses power save right this second,
> and have for years. It's not generally an issue, I suspect something
> worse is going on.
Maybe the wireless usb adapters do not function well in Linux with power save
on.

I bought them awhile ago, they had the highest reviews, and in Windows,
they did do 10-15MiB/s, in Linux, I see ~4.6MiB/s (but that was with power
save on) about the same, 4.5MiB/s.
http://www.amazon.com/Medialink-Wireless-Adapter-802-11n-Compatible/dp/B002RM08RE

100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 23.2803 s, 4.5 MB/s

Justin.

2011-04-13 22:26:49

by Joshua Scoggins

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?

I have an ASUS N-13 USB wireless adapter (which uses the 3070 chipset)
and have never ever had an issue with it. The only thing that I had
issues with was that certain functions would act
erratically until I upgraded to 2.6.37. I'm not sure if I'm using the
staging driver or not (I can't
get to the machine right now) but I believe that the module was called
rt2800 or something like that. It connects to a DSL/wireless router
combo made by netgear that is pretty bad but works
for my parents needs. It has massive latency issues connecting to web
sites but never an issue with SSH.

I also have a WNDR3700 but that machine does not connect to that
network. I notice that you're using WPA1 instead of WPA2. In my
experience I have found that WPA1 can cause issues on certain wireless
chipsets especially atheros and broadcom so it could be WPA1 is
causing the latency issue. It could also be that you are not
connecting to the router at 802.11n speeds but 802.11g. If you look at
your log it shows supported speeds as being a max of 54.0 Megabits per
second. This translates to about 5.4 megabytes per second ideally. The
reason why windows gets better speeds is because it is actually
connected at 802.11n speeds. It seems that you have a configuration
issue going on. Try connecting the wireless adapter to the 5.0 ghz
network instead of the 2.4 gigahertz network and see if you get a
speed improvement. On the 5.0 ghz band only 802.11a/n are supported so
there is no possibility of connecting at g speeds. If your adapter
doesn't support the 5.0 ghz band then it seems the driver is limiting
the adapter to g speeds.

Josh

On Wed, Apr 13, 2011 at 1:36 PM, Justin Piszcz <[email protected]> wrote:
>
>
> On Wed, 13 Apr 2011, Daniel Halperin wrote:
>
>> On Wed, Apr 13, 2011 at 1:13 PM, Justin Piszcz <[email protected]>
>> wrote:
>>>>
>>>> (1) What is the AP's beacon period and DTIM? Typical values are 100
>>>> TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
>>>> wakeup) which should imply a mean of 100 and max of 200 ms delay even
>>>> on pings.
>>>
>>> I am using a WNDR3700 with default settings in terms of beacons/etc. ?No
>>> issues with any device (laptop, computer, etc (in windows)), I have two
>>> wireless USB adapters (bought two) and in Windows, no problems, I don't
>>> think
>>> it is the WNDR3700. ?As far as linux/wpa-supplicant, using default
>>> settings.
>>
>> Not enough info. What does "iw dev wlan1 scan dump" ?(it might not be
>> wlan1 for you) say for "beacon interval"?
>
> # iw dev wlan0 scan dump
>
> BSS (hidden) (on wlan0) -- associated
> ? ? ? ?TSF: 103430650682 usec (1d, 04:43:50)
> ? ? ? ?freq: 2417
> ? ? ? ?beacon interval: 100
> ? ? ? ?capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
> ? ? ? ?signal: -59.00 dBm
> ? ? ? ?last seen: 1345742 ms ago
> ? ? ? ?SSID: (hidden)
> ? ? ? ?Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
> ? ? ? ?DS Parameter set: channel 2
> ? ? ? ?RSN: ? ? * Version: 1
> ? ? ? ? ? ? ? ? * Group cipher: TKIP
> ? ? ? ? ? ? ? ? * Pairwise ciphers: CCMP TKIP
> ? ? ? ? ? ? ? ? * Authentication suites: PSK
> ? ? ? ? ? ? ? ? * Capabilities: (0x0000)
> ? ? ? ?WPA: ? ? * Version: 1
> ? ? ? ? ? ? ? ? * Group cipher: TKIP
> ? ? ? ? ? ? ? ? * Pairwise ciphers: CCMP TKIP
> ? ? ? ? ? ? ? ? * Authentication suites: PSK
> ? ? ? ?ERP: <no flags>
> ? ? ? ?Extended supported rates: 24.0 36.0 48.0 54.0
> ? ? ? ?WMM: ? ? * Parameter version 1
> ? ? ? ? ? ? ? ? * u-APSD
> ? ? ? ? ? ? ? ? * BE: CW 15-1023, AIFSN 3
> ? ? ? ? ? ? ? ? * BK: CW 15-1023, AIFSN 7
> ? ? ? ? ? ? ? ? * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
> ? ? ? ? ? ? ? ? * VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec
> ? ? ? ?HT capabilities:
> ? ? ? ? ? ? ? ?Capabilities: 0x11ce
> ? ? ? ? ? ? ? ? ? ? ? ?HT20/HT40
> ? ? ? ? ? ? ? ? ? ? ? ?SM Power Save disabled
> ? ? ? ? ? ? ? ? ? ? ? ?RX HT40 SGI
> ? ? ? ? ? ? ? ? ? ? ? ?TX STBC
> ? ? ? ? ? ? ? ? ? ? ? ?RX STBC 1-stream
> ? ? ? ? ? ? ? ? ? ? ? ?Max AMSDU length: 7935 bytes
> ? ? ? ? ? ? ? ? ? ? ? ?DSSS/CCK HT40
> ? ? ? ? ? ? ? ?Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
> ? ? ? ? ? ? ? ?Minimum RX AMPDU time spacing: 1/2 usec (0x02)
> ? ? ? ? ? ? ? ?HT RX MCS rate indexes supported: 0-15
> ? ? ? ? ? ? ? ?HT TX MCS rate indexes are undefined
> ? ? ? ?WPS: ? ? * Version: 1.0
> ? ? ? ? ? ? ? ? * Manufacturer: Netgear, Inc.
> ? ? ? ? ? ? ? ? * Model: WNDR3700
> ? ? ? ? ? ? ? ? * Device name: (hidden)
> ? ? ? ? ? ? ? ? * Config methods: Ethernet, Label, PBC
>>
>> Does anyone know how to get the DTIM period out of iw?
>>
>>>> (2) How long does the client wait after waking up to go back to sleep?
>>>> It should be at least a few seconds. For ssh, then, you should see
>>>> something like a 100-200 ms delay for the first key and then nothing
>>>> at all unless you stop typing for a bit.
>>>
>>> It lags with each word I type, it is terrible. ?If I run something like
>>> dmesg or ps auxww, the entire session freezes for 5-10 seconds before it
>>> comes back.
>>
>> Sorry; I meant what is the software stack configured to do? Do some
>> looking around.
>>
>>>> I'm SSHing over a Wi-Fi link that uses power save right this second,
>>>> and have for years. It's not generally an issue, I suspect something
>>>> worse is going on.
>>>
>>> Maybe the wireless usb adapters do not function well in Linux with power
>>> save
>>> on.
>>>
>>> I bought them awhile ago, they had the highest reviews, and in Windows,
>>> they did do 10-15MiB/s, in Linux, I see ~4.6MiB/s (but that was with
>>> power
>>> save on) about the same, 4.5MiB/s.
>>>
>>> http://www.amazon.com/Medialink-Wireless-Adapter-802-11n-Compatible/dp/B002RM08RE
>>
>> Yeah, these might indicate a fairly sizable problem in the Linux drivers
>> IMO.
>>
>> Dan
>

2011-04-13 20:36:06

by Justin Piszcz

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?



On Wed, 13 Apr 2011, Daniel Halperin wrote:

> On Wed, Apr 13, 2011 at 1:13 PM, Justin Piszcz <[email protected]> wrote:
>>> (1) What is the AP's beacon period and DTIM? Typical values are 100
>>> TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
>>> wakeup) which should imply a mean of 100 and max of 200 ms delay even
>>> on pings.
>>
>> I am using a WNDR3700 with default settings in terms of beacons/etc. ?No
>> issues with any device (laptop, computer, etc (in windows)), I have two
>> wireless USB adapters (bought two) and in Windows, no problems, I don't
>> think
>> it is the WNDR3700. ?As far as linux/wpa-supplicant, using default settings.
>
> Not enough info. What does "iw dev wlan1 scan dump" (it might not be
> wlan1 for you) say for "beacon interval"?

# iw dev wlan0 scan dump

BSS (hidden) (on wlan0) -- associated
TSF: 103430650682 usec (1d, 04:43:50)
freq: 2417
beacon interval: 100
capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
signal: -59.00 dBm
last seen: 1345742 ms ago
SSID: (hidden)
Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
DS Parameter set: channel 2
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP TKIP
* Authentication suites: PSK
* Capabilities: (0x0000)
WPA: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP TKIP
* Authentication suites: PSK
ERP: <no flags>
Extended supported rates: 24.0 36.0 48.0 54.0
WMM: * Parameter version 1
* u-APSD
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec
HT capabilities:
Capabilities: 0x11ce
HT20/HT40
SM Power Save disabled
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 1/2 usec (0x02)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
WPS: * Version: 1.0
* Manufacturer: Netgear, Inc.
* Model: WNDR3700
* Device name: (hidden)
* Config methods: Ethernet, Label, PBC
>
> Does anyone know how to get the DTIM period out of iw?
>
>>> (2) How long does the client wait after waking up to go back to sleep?
>>> It should be at least a few seconds. For ssh, then, you should see
>>> something like a 100-200 ms delay for the first key and then nothing
>>> at all unless you stop typing for a bit.
>>
>> It lags with each word I type, it is terrible. ?If I run something like
>> dmesg or ps auxww, the entire session freezes for 5-10 seconds before it
>> comes back.
>
> Sorry; I meant what is the software stack configured to do? Do some
> looking around.
>
>>> I'm SSHing over a Wi-Fi link that uses power save right this second,
>>> and have for years. It's not generally an issue, I suspect something
>>> worse is going on.
>>
>> Maybe the wireless usb adapters do not function well in Linux with power
>> save
>> on.
>>
>> I bought them awhile ago, they had the highest reviews, and in Windows,
>> they did do 10-15MiB/s, in Linux, I see ~4.6MiB/s (but that was with power
>> save on) about the same, 4.5MiB/s.
>> http://www.amazon.com/Medialink-Wireless-Adapter-802-11n-Compatible/dp/B002RM08RE
>
> Yeah, these might indicate a fairly sizable problem in the Linux drivers IMO.
>
> Dan
>

2011-04-13 20:32:04

by Daniel Halperin

[permalink] [raw]
Subject: Re: 2.6.38: rt2800usb: high latency (1000ms)?

On Wed, Apr 13, 2011 at 1:13 PM, Justin Piszcz <[email protected]> wrote:
>> (1) What is the AP's beacon period and DTIM? Typical values are 100
>> TUs for beacons (102.4 ms) and 2 for DTIM (2 beacons per power-save
>> wakeup) which should imply a mean of 100 and max of 200 ms delay even
>> on pings.
>
> I am using a WNDR3700 with default settings in terms of beacons/etc. ?No
> issues with any device (laptop, computer, etc (in windows)), I have two
> wireless USB adapters (bought two) and in Windows, no problems, I don't
> think
> it is the WNDR3700. ?As far as linux/wpa-supplicant, using default settings.

Not enough info. What does "iw dev wlan1 scan dump" (it might not be
wlan1 for you) say for "beacon interval"?

Does anyone know how to get the DTIM period out of iw?

>> (2) How long does the client wait after waking up to go back to sleep?
>> It should be at least a few seconds. For ssh, then, you should see
>> something like a 100-200 ms delay for the first key and then nothing
>> at all unless you stop typing for a bit.
>
> It lags with each word I type, it is terrible. ?If I run something like
> dmesg or ps auxww, the entire session freezes for 5-10 seconds before it
> comes back.

Sorry; I meant what is the software stack configured to do? Do some
looking around.

>> I'm SSHing over a Wi-Fi link that uses power save right this second,
>> and have for years. It's not generally an issue, I suspect something
>> worse is going on.
>
> Maybe the wireless usb adapters do not function well in Linux with power
> save
> on.
>
> I bought them awhile ago, they had the highest reviews, and in Windows,
> they did do 10-15MiB/s, in Linux, I see ~4.6MiB/s (but that was with power
> save on) about the same, 4.5MiB/s.
> http://www.amazon.com/Medialink-Wireless-Adapter-802-11n-Compatible/dp/B002RM08RE

Yeah, these might indicate a fairly sizable problem in the Linux drivers IMO.

Dan