Skip to contentSkip to conversation

Not reaching optimum speeds with IEEE 802.11n

DISCUSSION Sourav 4 participants 9 messages Sep 10, 2014 – Sep 18, 2014 1 message not in the archive

lore
Share & tools
lore

Sourav

author
#0 lore raw

Hi All,
We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c), mac80211, and hostapd in our routers.

root:~# lsmod
Module                  Size  Used by    Tainted: P
rt2800usb              15371  0
rt2800lib              74214  1 rt2800usb
rt2x00usb               9718  1 rt2800usb
rt2x00lib              39328  3 rt2800usb,rt2800lib,rt2x00usb
mac80211              266596  3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211              214073  2 rt2x00lib,mac80211
compat                 17406  4 rt2800usb,rt2x00lib,mac80211,cfg80211

When we are measuring performance using iperf, we see ~20Mbps, using Channel 11 of 2.4GHZ, using 802.11n. The following is the iperf stats with iperf client running on the router and iperf server running on a laptop with IEEE802.11n adapter.

root:~# iperf -c 192.168.1.194 -p 5001 -i1 -fk -w146k -t100
------------------------------------------------------------
Client connecting to 192.168.1.194, TCP port 5001
TCP window size:   292 KByte (WARNING: requested   146 KByte)
------------------------------------------------------------
[  3] local 192.168.1.1 port 42520 connected with 192.168.1.194 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  1560 KBytes  12780 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  1.0- 2.0 sec  2672 KBytes  21889 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  2.0- 3.0 sec  2800 KBytes  22938 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  3.0- 4.0 sec  2624 KBytes  21496 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  4.0- 5.0 sec  2712 KBytes  22217 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  5.0- 6.0 sec  2664 KBytes  21823 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  6.0- 7.0 sec  2424 KBytes  19857 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  7.0- 8.0 sec  2424 KBytes  19857 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  8.0- 9.0 sec  2592 KBytes  21234 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  9.0-10.0 sec  2752 KBytes  22544 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3] 10.0-11.0 sec  3024 KBytes  24773 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3] 11.0-12.0 sec  2568 KBytes  21037 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3] 12.0-13.0 sec  2832 KBytes  23200 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3] 13.0-14.0 sec  2624 KBytes  21496 Kbits/sec

We are expecting speeds of upto 300Mbps(as per 802.11n specs), though those speeds are achievable using channel bonding over 5GHZ?
However at 2.4GHZ also we believe the speeds we are seeing are far too low....what are the maximum achievable speeds that we can expect in our setup and how to achieve them.....are there any performance tuning techniques that we can use....please reply asap as this is very urgent.

Signature · 7 lines
Warm Regards,
Sourav


______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________
#1 lore raw
Quoted 53 lines · Sourav

Hi All,
We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c), mac80211, and hostapd in our routers.

root:~# lsmod
Module Size Used by Tainted: P
rt2800usb 15371 0
rt2800lib 74214 1 rt2800usb
rt2x00usb 9718 1 rt2800usb
rt2x00lib 39328 3 rt2800usb,rt2800lib,rt2x00usb
mac80211 266596 3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211 214073 2 rt2x00lib,mac80211
compat 17406 4 rt2800usb,rt2x00lib,mac80211,cfg80211

When we are measuring performance using iperf, we see ~20Mbps, using Channel 11 of 2.4GHZ, using 802.11n. The following is the iperf stats with iperf client running on the router and iperf server running on a laptop with IEEE802.11n adapter.

root:~# iperf -c 192.168.1.194 -p 5001 -i1 -fk -w146k -t100
------------------------------------------------------------
Client connecting to 192.168.1.194, TCP port 5001
TCP window size: 292 KByte (WARNING: requested 146 KByte)
------------------------------------------------------------
[ 3] local 192.168.1.1 port 42520 connected with 192.168.1.194 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 1560 KBytes 12780 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 1.0- 2.0 sec 2672 KBytes 21889 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 2.0- 3.0 sec 2800 KBytes 22938 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 3.0- 4.0 sec 2624 KBytes 21496 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 4.0- 5.0 sec 2712 KBytes 22217 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 5.0- 6.0 sec 2664 KBytes 21823 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 6.0- 7.0 sec 2424 KBytes 19857 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 7.0- 8.0 sec 2424 KBytes 19857 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 8.0- 9.0 sec 2592 KBytes 21234 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 9.0-10.0 sec 2752 KBytes 22544 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 10.0-11.0 sec 3024 KBytes 24773 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 11.0-12.0 sec 2568 KBytes 21037 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 12.0-13.0 sec 2832 KBytes 23200 Kbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 13.0-14.0 sec 2624 KBytes 21496 Kbits/sec
Quoted 2 lines

We are expecting speeds of upto 300Mbps(as per 802.11n specs), though those speeds are achievable using channel bonding over 5GHZ?

First of all, the speeds in the 802.11n specs are phy rates. This rate is what is used for individual frames. So you are comparing apples and beans (not in the fruit department) by looking at TCP throughput. You will need to determine the actual phy rate during the test using iw. This depends on condition in the environment. 300Mbps requires two streams (2x2) and 40MHz bandwidth.

Regards,
Arend

Quoted 6 lines

However at 2.4GHZ also we believe the speeds we are seeing are far too low....what are the maximum achievable speeds that we can expect in our setup and how to achieve them.....are there
any performance tuning techniques that we can use....please reply asap as this is very urgent.

#2 lore raw
Quoted 2 lines · Arend van Spriel
Quoted 1 line · Sourav

We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c),

The Ralink USB hardware is quite bad in reporting TX status and as such minstrel_ht cannot do proper rate selection.
If you watch the rc stats at /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0-0/stations/xx:xx:xx:xx:xx:xx/rc_stats you might see a lot of rate selection "hopping".

Regards.
Helmut

#9 lore raw
In reply to Sourav
Quoted 13 lines · Sourav

Hi All,
We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c), mac80211, and hostapd in our routers.

root:~# lsmod
Module                  Size  Used by    Tainted: P
rt2800usb              15371  0
rt2800lib              74214  1 rt2800usb
rt2x00usb               9718  1 rt2800usb
rt2x00lib              39328  3 rt2800usb,rt2800lib,rt2x00usb
mac80211              266596  3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211              214073  2 rt2x00lib,mac80211
compat                 17406  4 rt2800usb,rt2x00lib,mac80211,cfg80211
Quoted 2 lines

When we are measuring performance using iperf, we see ~20Mbps, using Channel 11 of 2.4GHZ, using 802.11n.

Known problem of rt2800usb. You might try the original vendor driver[1] if you want to use the device as STA. Are you running this test on ARM? rt2800usb runs *extremely* poor with Raspi, e.g.

With the vendor driver rt5572..., I'm getting > 100MBit/s (measured w/ netperf) running at 2.4 GHz and 40 MHz even through reinforced concrete floor using a rt5372 chip, e.g. - even w/ Raspberry Pi.

[1] http://www.mediatek.com/en/downloads/

Kind regards,
Andreas

#3 lore raw
In reply to Helmut Schaa

Hello Helmut!

Quoted 6 lines · Helmut Schaa
Quoted 2 lines · Arend van Spriel
Quoted 1 line · Sourav

We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c),

The Ralink USB hardware is quite bad in reporting TX status and as such minstrel_ht cannot do proper rate selection.

Rate control of the vendor driver seems to work just fine (or at least better as minstrel_ht).

Iow: minstrel_ht doesn't meet the requirements of ralink chipsets :-).

But this is not the only problem of rt2800usb. As long as a driver has the ability to damage a device [1], there is something more basically broken!

[1] http://thread.gmane.org/gmane.linux.kernel.wireless.general/126856

Regards,
Andreas

#4 lore raw
Quoted 4 lines · Andreas Hartmann

Hello Helmut!

Quoted 1 line · Helmut Schaa

On Wed, Sep 10, 2014 at 10:42 AM, Arend van Spriel <[email protected]> wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines · Sourav
Quoted 1 line

We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c),

The Ralink USB hardware is quite bad in reporting TX status and as such minstrel_ht cannot do proper rate selection.

Rate control of the vendor driver seems to work just fine (or at least better as minstrel_ht).

Indeed, the ralink proprietary rate control does not depend on per frame statistics.

Quoted 2 lines

Iow: minstrel_ht doesn't meet the requirements of ralink chipsets :-).

Yep.

Quoted 3 lines

But this is not the only problem of rt2800usb. As long as a driver has the ability to damage a device [1], there is something more basically broken!

Also agreed.

Helmut

author
#5 lore raw
In reply to Helmut Schaa
Quoted 11 lines · Helmut Schaa
Quoted 2 lines · Arend van Spriel
Quoted 1 line · Sourav

We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c),

The Ralink USB hardware is quite bad in reporting TX status and as such minstrel_ht cannot do proper rate selection.
If you watch the rc stats at /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0-0/stations/xx:xx:xx:xx:xx:xx/rc_stats you might see a lot of rate selection "hopping".

Regards.
Helmut

please take a look at the attachments.... the first one shows the rc_stats and iperf stats side by side on the router(iperf is running in client mode in the router).....the second attachment is from a laptop which is running iperf in server mode.

I don't see a lot of rate "hopping" in the rc_stats file, (T,t and P) rates are pretty much stable.... yet there is a big difference between those rates and the throughput using iperf...... when you say "Ralink USB hardware is quite bad in reporting TX status", do you mean that the HW reports less tx rate to minstrel_ht and so its rate calculation is screwed up? Can you please let me know the section of code inside Rc_80211_minstrel_ht.c (or somewhere else) which deals with getting the tx rate from ralink HW?

Signature · 8 lines
Warm Regards,
Sourav



______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________
#6 lore raw
Quoted 19 lines · Sourav
Quoted 12 lines · Helmut Schaa
Quoted 4 lines · Arend van Spriel
Quoted 2 lines · Sourav

We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c),

The Ralink USB hardware is quite bad in reporting TX status and as such minstrel_ht cannot do proper rate selection.
If you watch the rc stats at

Quoted 5 lines

/sys/kernel/debug/ieee80211/phy0/netdev\:wlan0-0/stations/xx:xx:xx:xx:xx:xx/rc_stats you might see a lot of rate selection "hopping".

Regards.
Helmut

Quoted 8 lines

please take a look at the attachments.... the first one shows the rc_stats and iperf stats side by side on the router(iperf is running in client mode in the router).....the second attachment is from a laptop which is running iperf in server mode.

I don't see a lot of rate "hopping" in the rc_stats file, (T,t and P) rates are pretty much stable.... yet there is a big difference between those rates and the throughput using iperf......

Indeed, rc_stats looks acceptable.

Quoted 3 lines

when you say "Ralink USB hardware is quite bad in reporting TX status", do you mean that the HW reports less tx rate to minstrel_ht and so its rate calculation is screwed up?

The HW sometimes does not report the status of transmitted frames correctly. The TX status register is a FIFO of 16 (or similar) elements and if the driver is
not reading it "fast enough" the FIFO will overflow :( at least that was the point
when I was looking at the ralink hardware last time. Not sure if something changed recently.

Quoted 2 lines

Can you please let me know the section of code inside Rc_80211_minstrel_ht.c (or somewhere else) which deals with getting the tx rate from ralink HW?

There is no special code in minstrel(_ht) in regard to rt2x00.

Are you able able to get some statistics on the receiver side (your windows machine)
regarding TX rates and AMPDU lengths?

Helmut

author
#8 lore raw
In reply to a message not in the archive

Hi All,
Is there a parameter in hostapd.conf or elsewhere to enable/disable MPDU and MSDU aggregation? Please reply as this is very urgent.

Thanks in advance,
Sourav

Quoted 50 lines · Sourav
Quoted 30 lines · Helmut Schaa
Quoted 15 lines · Sourav
Quoted 8 lines · Helmut Schaa
Quoted 2 lines · Arend van Spriel
Quoted 1 line · Sourav

We are using Ralink chip Rt3072L (using rt2800usb drivers rt2800usb.c),

The Ralink USB hardware is quite bad in reporting TX status and as such minstrel_ht cannot do proper rate selection.
If you watch the rc stats at

Quoted 6 lines

/sys/kernel/debug/ieee80211/phy0/netdev\:wlan0-0/stations/xx:xx:xx:xx:xx:xx/rc_stats

you might see a lot of rate selection "hopping".

Regards.
Helmut

Quoted 8 lines

please take a look at the attachments.... the first one shows the rc_stats and iperf stats side by side on the router(iperf is running in client mode in the router).....the second attachment is from a laptop which is running iperf in server mode.

I don't see a lot of rate "hopping" in the rc_stats file, (T,t and P) rates are pretty much stable.... yet there is a big difference between those rates and the throughput using iperf......

Indeed, rc_stats looks acceptable.

Quoted 3 lines

when you say "Ralink USB hardware is quite bad in reporting TX status", do you mean that the HW reports less tx rate to minstrel_ht and so its rate calculation is screwed up?

Quoted 7 lines

The HW sometimes does not report the status of transmitted frames correctly. The TX status register is a FIFO of 16 (or similar) elements and if the driver is
not reading it "fast enough" the FIFO will overflow :( at least that was the point
when I was looking at the ralink hardware last time. Not sure if something changed recently.

How did you detect this? I can see no error messages in syslog....hence I am thinking that the HW is processing packets properly....though I may be wrong here.

Quoted 7 lines
Quoted 2 lines

Can you please let me know the section of code inside Rc_80211_minstrel_ht.c (or somewhere else) which deals with getting the tx rate from ralink HW?

There is no special code in minstrel(_ht) in regard to rt2x00.

Are you able able to get some statistics on the receiver side (your windows machine)
regarding TX rates and AMPDU lengths?

the 2nd attachment had logs from the windows machine.....it is also showing similar rates as on the router

Quoted 1 line

Helmut

Signature · 7 lines
Warm Regards,
Sourav


______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________