On Wed, Jan 14, 2015 at 04:40:00PM +0100, Ján Kušniar wrote: > Hello, > > I've set up a small wifi AP using alix 3d2 computer board and Mikrotik > R52nM mini PCI wireless adapter. Works great except for wireless > throughput. It's running 5.6 stable, usual AP setup (wifi adapter in > hostap mode, dhcpd, nat in pf). No sysctls or anything not mentioned in > FAQ was modified. > > Adapter is: > athn0 at pci0 dev 12 function 0 "Atheros AR9280" rev 0x01: irq 9 > athn0: AR9280 rev 2 (2T2R), ROM rev 21, address 4c:5e:0c:11:c3:5f > > > AP configuration: > # ifconfig athn0 > athn0: flags=28843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6> mtu > 1500 > lladdr 4c:5e:0c:11:c3:5f > priority: 4 > groups: wlan > media: IEEE802.11 autoselect mode 11g hostap > status: active > ieee80211: nwid kusniarovci chan 11 bssid 4c:5e:0c:11:c3:5f > wpakey XXXXXXXXXXX wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp > wpagroupcipher tkip > inet 192.168.188.1 netmask 0xffffff00 broadcast 192.168.188.255 > > # cat /etc/hostname.athn0 > up media autoselect mediaopt hostap mode 11g chan 11 nwid kusniarovci \ > wpakey XXXXXXXX > inet 192.168.188.1 255.255.255.0 > > > Even though it's running 54Mbit 802.11g, I can't get over ~15Mbit/s. I'm > testing from Linux laptop with intel centrino wireless adapter (11abgn). > Tests are performeg using iperf: > > linux_client$ iperf -c 192.168.188.1 -i 1 -t 60 > ap# iperf -s > ------------------------------------------------------------ > Server listening on TCP port 5001 > TCP window size: 16.0 KByte (default) > ------------------------------------------------------------ > [ 4] local 192.168.188.1 port 5001 connected with 192.168.188.32 port > 48367 > [ ID] Interval Transfer Bandwidth > [ 4] 0.0-60.2 sec 111 MBytes 15.5 Mbits/sec > > > > pf disabled during tests. Are there any pointers to tune wireless > subsystem to better performance? Did I reach hardware limits? Is it > athn driver issue? During network load there seems to be a lot of > interrupts on athn reported by systat vmstat. There is also 100Mbit > ehternet adapter on alix board (vr0). It perfrorms really well > (~95Mbit/s according to iperf). > > > Thanks for any pointers
OpenBSD's implementation of rate adaptation is basic. It's possible that you'll see the AP sending data frames at less than 54Mbit/s under normal conditions. You'll probably see better results with other OSs since they have better tuned wifi stacks. It's an interesting problem to look into but nobody is doing that right now. But how knows, there could also be a driver bug that prevents higher rates from being used. 15Mbit/s sounds as if it maxes out at 18Mbit/s (the highest QPSK rate) and never switches to OFDM rates (24 - 54 Mbit/s). Try this on your AP: # tcpdump -n -i athn0 -y IEEE802_11_RADIO -vvv | grep data This shows a broadcast frame sent at 1 Mbit/s (which is normal for broadcast since even old devices that only support 1 and 2 Mbit/s need to receive it): 17:19:44.890129 802.11 flags=42<PROTECTED>: data: 00:00:5e:00:01:01 sap 36 > 01:00:5e:00:00:12 sap 37 I (s=64,r=48,R) len=80, <radiotap v0, 1Mbit/s, chan 1, 11g> This shows a ping sent at 1 Mbit/s and the reply received at 2 Mbit/s: 2:18.085924 802.11 flags=42<PROTECTED>: data: fe:e1:ba:d0:6a:df sap 00 > 00:13:02:03:a5:e7 sap 12 I (s=0,r=16,C) len=104, <radiotap v0, 1Mbit/s, chan 1, 11g> 17:22:18.091566 802.11 flags=41<PROTECTED>: data: 00:13:02:03:a5:e7 sap 00 > fe:e1:ba:d0:6a:df sap 17 I (s=0,r=16,C) len=108, <radiotap v0, tsf 502527151889, S HORTPRE, 2Mbit/s, chan 1, 11g, sig 43dBm, antenna 1> During bulk data transfer I see rates of up to 18Mbit/s being used. Do you see any higher rates than that, and if so, over long intervals of time or just occasionally? This access point pretty much matches your setup. athn0 at pci0 dev 17 function 0 "Atheros AR9280" rev 0x01: irq 15 athn0: AR9280 rev 2 (2T2R), ROM rev 16, address 00:0e:8e:24:52:7d $ ifconfig athn0 athn0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr 00:0e:8e:24:52:7d priority: 4 groups: wlan media: IEEE802.11 autoselect (autoselect mode 11g hostap) status: active ieee80211: nwid stsp.name chan 1 bssid 00:0e:8e:24:52:7d wpakey <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip