OpenWrt Forum Archive

Topic: ath9k low throughput (20Mbps) under 300Mbps/HT40

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I only have 20Mbps of iperf test on 300Mbps/HT40, what could probably be the problem then?

I already attached two pigtails for both the AP and STA. IXP425 platform

AP: IXP425 platform OpenWrt 18529, AR9223, ath9k
STA: IXP425 platform OpenWrt 18529, AR9223, ath9k

during the iperf test the AP has an average CPU load of 70% and the STA is 85%.

THANKS A LOT!

AP && STA: OpenWrt 18529
***************************************************************************************************************************************
dmesg output:
...
wlan: trunk
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 2008-10-02 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, DFS, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: trunk
device eth0 entered promiscuous mode
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq <at> bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz <at> 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz <at> 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz <at> 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz <at> 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz <at> 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz <at> 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
PCI: enabling device 0000:00:01.0 (0340 -> 0342)
cfg80211: Regulatory domain changed to country: US
        (start_freq - end_freq <at> bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz <at> 40000 KHz), (300 mBi, 2700 mBm)
        (5170000 KHz - 5250000 KHz <at> 40000 KHz), (300 mBi, 1700 mBm)
        (5250000 KHz - 5330000 KHz <at> 40000 KHz), (300 mBi, 2000 mBm)
        (5490000 KHz - 5710000 KHz <at> 40000 KHz), (300 mBi, 2000 mBm)
        (5735000 KHz - 5835000 KHz <at> 40000 KHz), (300 mBi, 3000 mBm)
phy0: Selected rate control algorithm 'ath9k_rate_control'
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR9280 Rev:2 mem=0xc4aa0000, irq=7
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)


AP:
***************************************************************************************************************************************
root <at> OpenWrt:/# hostapd -d /var/run/hostapd-wlan0.conf
Configuration file: /var/run/hostapd-wlan0.conf
nl80211: Add own interface ifindex 4
nl80211: Add own interface ifindex 6
br-lan: port 2(wlan0) entering disabled state
br-lan: topology change detected, propagating
br-lan: port 2(wlan0) entering forwarding state
nl80211: Add own interface ifindex 9
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x6
RATE[3] rate=110 flags=0x6
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Scan for neighboring BSSes prior to enabling 40 MHz channel
Scan requested (ret=0) - scan timeout 10 seconds
Interface initialization will be completed in a callback
nl80211: Event message available
nl80211: Scan trigger
nl80211: Event message available
nl80211: New scan results available
Received scan results (8 BSSes)
40 MHz affected channel range: [2437,2487] MHz
Neighboring BSS: 00:25:86:21:a4:56 freq=2437 pri=0 sec=0
Neighboring BSS: 00:14:78:fc:2a:6a freq=2437 pri=0 sec=0
Neighboring BSS: 00:23:cd:16:4e:4c freq=2437 pri=0 sec=0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 13  Frequency: 2472 MHz
Flushing old station entries
Deauthenticate all stations
nl_set_encr: ifindex=6 alg=0 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=0
nl_set_encr: ifindex=6 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
nl_set_encr: ifindex=6 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
nl_set_encr: ifindex=6 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:19:70:2a:10:99 and ssid 'OpenWrt'
nl80211: Set beacon (beacon_set=0)
wlan0: Setup of interface done.
MGMT (TX callback) fail
mgmt::proberesp cb
MGMT (TX callback) ACK
MGMT (TX callback) ACK
mgmt::proberesp cb
MGMT (TX callback) ACK
mgmt::proberesp cb
mgmt::auth
authentication: STA=00:19:70:2a:10:97 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:19:70:2a:10:97 IEEE 802.11: authentication OK (open system)
wlan0: STA 00:19:70:2a:10:97 MLME: MLME-AUTHENTICATE.indication(00:19:70:2a:10:97, OPEN_SYSTEM)
wlan0: STA 00:19:70:2a:10:97 MLME: MLME-DELETEKEYS.request(00:19:70:2a:10:97)
authentication reply: STA=00:19:70:2a:10:97 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
MGMT (TX callback) ACK
mgmt::auth cb
wlan0: STA 00:19:70:2a:10:97 IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=00:19:70:2a:10:97 capab_info=0x421 listen_interval=10
Validating WMM IE: OUI 00:50:f2  OUI type 2  OUI sub-type 0  version 1  QoS info 0x0
HT: STA 00:19:70:2a:10:97 HT Capabilities Info: 0x104e
handle_assoc STA 00:19:70:2a:10:97 - no greenfield, num of non-gf stations 1
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x7 changes=2
nl80211: Set beacon (beacon_set=1)
  new AID 1
wlan0: STA 00:19:70:2a:10:97 IEEE 802.11: association OK (aid 1)
MGMT (TX callback) ACK
mgmt::assoc_resp cb
wlan0: STA 00:19:70:2a:10:97 IEEE 802.11: associated (aid 1)
AP-STA-CONNECTED 00:19:70:2a:10:97
wlan0: STA 00:19:70:2a:10:97 MLME: MLME-ASSOCIATE.indication(00:19:70:2a:10:97)
wlan0: STA 00:19:70:2a:10:97 MLME: MLME-DELETEKEYS.request(00:19:70:2a:10:97)

.......................................................................................


root <at> OpenWrt:/# iw wlan0 station dump
Station 00:19:70:2a:10:97 (on wlan0)
        inactive time:  0 ms
        rx bytes:       205674288
        rx packets:     140010
        tx bytes:       5161452
        tx packets:     69608
        signal:         -18 dBm
        tx bitrate:     300.0 MBit/s MCS 15 40Mhz short GI

.......................................................................................


root <at> OpenWrt:/# cat /sys/kernel/debug/ath9k/phy0/rcstat
Rate         Success  Retries  XRetries PER

  1.0:        0        0        0        0
  2.0:        0        0        0        0
  5.5:        0        0        0        0
11.0:        0        0        0        0
  6.0:        0        0        0        0
  9.0:        0        0        0        0
12.0:        0        0        0        0
18.0:        0        0        0        0
24.0:        0        0        0        0
36.0:        0        0        0        0
48.0:        0        0        0        0
54.0:        0        0        0        0
  6.5:        0        0        0        0
13.0:        0        0        0        0
19.5:        0        0        0        0
26.0:        0        0        0        0
39.0:        0        0        0        0
52.0:        0        0        0        0
58.5:        0        0        0        0
65.0:        0        0        0        0
13.0:        0        0        0        0
26.0:        0        0        0        0
39.0:        0        0        0        0
52.0:        0        0        0        0
78.0:        0        0        0        0
104.0:        0        0        0        0
117.0:        0        0        0        0
130.0:        0        0        0        0
13.5:        0        0        0        0
27.5:        0        0        0        0
40.5:        0        0        0        0
54.0:        0        0        0        0
81.5:        0        0        0        0
108.0:        0        0        0        0
121.5:        0        0        0        0
135.0:        0        0        0        0
150.0:        0        0        0        0
27.0:        0        0        0        0
54.0:        0        0        0        0
81.0:        0        0        0        0
108.0:        0        0        0        0
162.0:        0        0        0        0
216.0:        3        0        0        0
243.0:        3        0        0        0
270.0:        3        0        0        0
300.0:    82601        3        0        0

.......................................................................................

root <at> OpenWrt:/# cat /sys/kernel/debug/ieee80211/phy0/stations/station_mac/ht_capa
ht supported
cap: 0x104e
ampdu factor/density: 3/6
MCS mask: ff ff 00 00 00 00 00 00 00 00
MCS rx highest: 0
MCS tx params: 0


STA:
***************************************************************************************************************************************
root <at> OpenWrt:/# iperf -c 192.168.2.124 -i 1 -n 20000
------------------------------------------------------------
Client connecting to 192.168.2.124, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 192.168.2.123 port 60579 connected with 192.168.2.124 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0- 1.0 sec  3.04 MBytes  25.5 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  1.0- 2.0 sec  3.02 MBytes  25.4 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  2.0- 3.0 sec  2.91 MBytes  24.4 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  3.0- 4.0 sec  2.98 MBytes  25.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  4.0- 5.0 sec  3.02 MBytes  25.3 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  5.0- 6.0 sec  2.93 MBytes  24.6 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  6.0- 7.0 sec  3.02 MBytes  25.3 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  7.0- 8.0 sec  2.93 MBytes  24.6 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  8.0- 9.0 sec  2.99 MBytes  25.1 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  9.0-10.0 sec  2.80 MBytes  23.5 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 10.0-11.0 sec  2.98 MBytes  25.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 11.0-12.0 sec  2.85 MBytes  23.9 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 12.0-13.0 sec  2.98 MBytes  25.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 13.0-14.0 sec  3.03 MBytes  25.4 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 14.0-15.0 sec  2.83 MBytes  23.7 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 15.0-16.0 sec  3.03 MBytes  25.4 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 16.0-17.0 sec  2.98 MBytes  25.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 17.0-18.0 sec  2.97 MBytes  24.9 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 18.0-19.0 sec  2.80 MBytes  23.5 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 19.0-20.0 sec  3.00 MBytes  25.2 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 20.0-21.0 sec  2.98 MBytes  25.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 21.0-22.0 sec  2.88 MBytes  24.2 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 22.0-23.0 sec  2.98 MBytes  25.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 23.0-24.0 sec  2.86 MBytes  24.0 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 24.0-25.0 sec  2.96 MBytes  24.8 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5] 25.0-26.0 sec  2.87 MBytes  24.1 Mbits/sec
[ ID] Interval       Transfer     Bandwidth

.......................................................................................

root <at> OpenWrt:/# iw wlan0 station dump
Station 00:19:70:2a:10:99 (on wlan0)
        inactive time:  0 ms
        rx bytes:       7556920
        rx packets:     101870
        tx bytes:       302582584
        tx packets:     205200
        signal:         -23 dBm
        tx bitrate:     300.0 MBit/s MCS 15 40Mhz short GI

.......................................................................................

root <at> OpenWrt:/# cat /sys/kernel/debug/ath9k/phy0/rcstat
Rate         Success  Retries  XRetries PER

  1.0:        0        0        0        0
  2.0:        0        0        0        0
  5.5:        0        0        0        0
11.0:        0        0        0        0
  6.0:        0        0        0        0
  9.0:        0        0        0        0
12.0:        0        0        0        0
18.0:        0        0        0        0
24.0:        0        0        0        0
36.0:        0        0        0        0
48.0:        0        0        0        0
54.0:        0        0        0        0
  6.5:        0        0        0        0
13.0:        0        0        0        0
19.5:        0        0        0        0
26.0:        0        0        0        0
39.0:        0        0        0        0
52.0:        0        0        0        0
58.5:        0        0        0        0
65.0:        0        0        0        0
13.0:        0        0        0        0
26.0:        0        0        0        0
39.0:        0        0        0        0
52.0:        0        0        0        0
78.0:        0        0        0        0
104.0:        0        0        0        0
117.0:        0        0        0        0
130.0:        0        0        0        0
13.5:        0        0        0        0
27.5:        0        0        0        0
40.5:        0        0        0        0
54.0:        0        0        0        0
81.5:        0        0        0        0
108.0:        0        0        0        0
121.5:        0        0        0        0
135.0:        0        0        0        0
150.0:        0        0        0        0
27.0:        0        0        0        0
54.0:        0        0        0        0
81.0:        0        0        0        0
108.0:        0        0        0        0
162.0:        0        0        0        0
216.0:        3        0        0        0
243.0:        3        0        0        0
270.0:        5        0        0        0
300.0:   119472       54        4        0

.......................................................................................

root <at> OpenWrt:/# cat /sys/kernel/debug/ieee80211/phy0/stations/ap_mac/ht_capa
ht supported
cap: 0x104e
ampdu factor/density: 3/0
MCS mask: ff ff 00 00 00 00 00 00 00 00
MCS rx highest: 0
MCS tx params: 0

.......................................................................................

ping result:
--- 192.168.2.124 ping statistics ---
101 packets transmitted, 101 packets received, 0% packet loss
round-trip min/avg/max = 1.930/2.396/3.892 ms

(Last edited by oiioeu on 15 Jan 2010, 02:13)

I was initially getting around 30-40Mbps with non HT settings using a laptop with 150Mbps N card. With the same setup and using HT speeds and a laptop with a 300Mbps card all on G I got almost 50Mbps. Lately I'm having a hard time hitting 30Mbps, but I'm not sure if that is due to the heavy interferance in the area. What kind of speeds should be seen with everything working proper?

I've been having similar issues. What's your CPU usage like?
I've been trying to upgrade my wl-500gp to 802.11n using a TL-WN861N mini-pci card. I'm using a recent trunk build (r19111) and only getting about 22Mbps throughput on the wireless. During the transfer CPU usage hits 100%, with most of it listed as sirq by top.

maybe it isn't a good idea to run iperf on the router.
I have a routerstation pro with a r52n-wifi (running 11n at 5GHz). 
iperf between a laptop connected to the wifi (bridged to lan) and a workstation connected on the lan, is getting 112 Mbits/sec. If I run iperf between the router and the laptop I only get 60Mbits/sec. I guess the cpu of the router is too slow to run iperf.

and I would try to run 11n in the 5 GHz range, if it's possible.

I have some problems using the r52n-card (ath9k) with the recent trunk, but with r18926 it is working.

I've been measuring throughput from a wirelessly connected laptop to a desktop connected to the LAN, no encryption, as far as I can tell it's just the ath9k drivers chewing the CPU.

during the iperf test between the AP and STA the AP has an average CPU load of 70% and the STA is 85%. I agree that it would be better not to test on routers, but as you see the AP still has 30% idle of the CPU, I'm not expecting a throughput of 1XXMBps in my case, but a 20MBps is irregular as I heard of, I will try a different topology for the test later, thanks everybody.

OK, here it is the topology:

PC_A <--> SU <--> AP <--> PC_B

I set up the ethernet connection between PC_A and SU, PC_B and the AP, there was wireless 11n connection between the SU and the AP, the AP uses a bridge for wlan0 and eth0, the SU uses NAT to forward packets from PC_A.

I only have 6Mbps by iperf test.

it seems the ath9k driver is working properly at a 300Mbps/HT40 transferring speed while some modules ( for example the hostapd, bridge, etc. ) in the upper layer is working very inefficiently, which leads to a very low throughput, 20Mbps.

anyone have any idea? Thanks alot!

The discussion might have continued from here.