LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2017, 12:43 PM   #1
maxf130
LQ Newbie
 
Registered: Feb 2017
Location: Aberystwyth
Distribution: Slackware
Posts: 12

Rep: Reputation: 0
Worse than expected throughput on an 802.11n wireless network, with a WLE600VX/hostapd/Slackware-14.2 based access point


I'm trying to set up a wireless access point on a Slackware 14.2 based system. After much fiddling, all clients in my house can now connect.

However throughput is substantially worse than I would expect. A quick test with iperf is indicative of the performance:
Code:
------------------------------------------------------------
Client connecting to 192.168.1.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.3.131 port 37778 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  18.6 MBytes  15.6 Mbits/sec
Multiple parallel connections improve on that somewhat:

Code:
$ iperf -c 192.168.1.1 -P 5
------------------------------------------------------------
Client connecting to 192.168.1.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  7] local 192.168.3.131 port 37844 connected with 192.168.1.1 port 5001
[  4] local 192.168.3.131 port 37838 connected with 192.168.1.1 port 5001
[  3] local 192.168.3.131 port 37836 connected with 192.168.1.1 port 5001
[  5] local 192.168.3.131 port 37840 connected with 192.168.1.1 port 5001
[  6] local 192.168.3.131 port 37842 connected with 192.168.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-10.0 sec  7.12 MBytes  5.96 Mbits/sec
[  6]  0.0-10.0 sec  7.12 MBytes  5.95 Mbits/sec
[  4]  0.0-10.1 sec  7.12 MBytes  5.94 Mbits/sec
[  7]  0.0-10.1 sec  7.12 MBytes  5.93 Mbits/sec
[  3]  0.0-10.1 sec  7.12 MBytes  5.93 Mbits/sec
[SUM]  0.0-10.1 sec  35.6 MBytes  29.7 Mbits/sec
The highest summative throughput I've seen is just shy 50Mbits/sec. This is a 802.11n network, so at minimum I would expect throughput approaching 150Mbits. In fact, Android and Windows clients report a link speed of 150Mbits/sec.

Throughput over UDP is larger. I saw 100Mbits/sec with 100 parallel connections with iperf, though I cannot reproduce that now. Using speedtest.net while connected to the wireless network yields a speed of ~60Mbits/sec. I guess that is using UDP also.

In any case, I'm pretty sure that the NIC is capable of 300Mbits/sec theoretical throughput on 2.4GHz, I'm not sure why that is not being achieved either.

Some additional info:
Code:
$ uname -a
Linux xenon 4.4.38 #1 SMP Sun Feb 19 14:25:36 GMT 2017 x86_64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz GenuineIntel GNU/Linux
Code:
hostapd -v       
hostapd v2.6
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2016, Jouni Malinen <j@w1.fi> and contributors
Relevant output of
Code:
lspci -vnn
Code:
03:00.0 Network controller [0280]: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter [168c:003c]
        Flags: bus master, fast devsel, latency 0, IRQ 137
        Memory at df000000 (64-bit, non-prefetchable) [size=2M]
        Expansion ROM at df200000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] MSI: Enable+ Count=8/8 Maskable+ 64bit-
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
        Kernel driver in use: ath10k_pci
        Kernel modules: ath10k_pci
I guess the hostapd config file is usefull ;-) (though to be clear, performance doesn't seem to depend strongly on the settings):

Code:
$ cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=TheCrypt
hw_mode=g
channel=1

ieee80211d=1
country_code=GB

ieee80211n=1
wmm_enabled=1
ht_capab=[HT40+][SMPS-STATIC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][LDPC]

ieee80211ac=1

auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_psk_file=/etc/hostapd/hostapd.wpa_psk
rsn_pairwise=CCMP TKIP

# Low priority / AC_BK = background
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10
#
# Normal priority / AC_BE = best effort
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=3
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7
#
# High priority / AC_VI = video
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188
#
# Highest priority / AC_VO = voice
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102
I applied a patch that forces hostapd to run the NIC in dual channel mode (before it would check for interference). That brought the stated links speed up from 72Mbits/sec to 150Mbits/sec, but it made no difference to actual throughput.


My suspicion is that interference from neighboring access points (there are around 7 of them) is causing this, however I don't know how to test that. I don't control the other access points, so shutting them off is not an option.

Any help would be greatly appreciated.

Max
 
Old 02-23-2017, 10:28 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I tried speed tests with my wifi and found that positioning was everything. Just beside the router I get nearly 40 MB/S, but with a bit of space and a partition wall in the way, the speed is less than half. Quality is key, and it was the one thing you didn't give us.

As for channels, do a scan with iwlist some evening and note what your neighbours use. Then get off those channels and specify a quiet one. It's the best you can do. Another useful exercise is to make a wired connection to the router, and benchmark your connection to those sites with that. Most network connections are good for at least 100Mbit/S these days. Even my bargain basement laptop has a 1 Gb nic in it. That's also dependent on wire length & quality, as is even 100Mbit. Long cat5/cat6 cables exist, but short ones are better.
 
Old 02-23-2017, 11:54 AM   #3
maxf130
LQ Newbie
 
Registered: Feb 2017
Location: Aberystwyth
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
Well that's fair enough. Playing around with antenna positioning, I can change throughput by an order of magnitude (for the worse mind you but at least it's something).

At the moment the antennae are behind two desktop towers. I will get an extension or something to position them well clear and then try again.

Still it puzzles me that throughput is so much better when using multiple connections. If the limiting factor were the signal quality/SN ratio then I would expect multiple connections not to help.
 
Old 02-24-2017, 04:26 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
You've a chain of links there: Each link in the chain is capable of being slow or misconfigured, and you need to check which.
* Going better with multiple connections to the same host implies something (router or pc) is limiting the max speed of any connection. Are we on the fastest protocol?
* Going better with multiple connections to different hosts implies wireless reception is throttling the speed.

Go to cat 5 or cat 6 and benchmark a wired test to your benchmarking sites. Then check each link until your interest dries up. A great indicator is quality. Try
Code:
iwlist wlan0 scanning |grep -e 'Channel' -e 'Quality' -e 'ESSID' |less
That should give 3 lines for each local access point showing channel number, quality, and channel name. I'm at home, router in the hall, and I'm on the first floor of a small house. My quality is 54/70 @ -56dbm, which is a signal of 2.511 nanowatts by my (rusty) calculations. Not a lot to be expecting hundreds of megs from.
 
Old 02-27-2017, 12:40 PM   #5
maxf130
LQ Newbie
 
Registered: Feb 2017
Location: Aberystwyth
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
I've positioned the antennae well clear of the tower. Signal quality is now 70/70 and signal strength is -24dbm.

The throughput however is unchanged, it is still hovering around 15Mb/sec.

I'm pretty convinced at this point that signal strength/quality is not the limiting factor here. Could this be some limitation of the NIC? Perhaps it is optimized for traffic in the outgoing 'direction' only?
 
Old 02-28-2017, 06:04 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
As you are anxious to get to the bottom of this test stages logically.

an you set up a high bandwidth wired connection to the router? Plug in and test throughput that way, taking the internet out of it. ISPs normally throttle upload, so I presume this is download. Is is it saving spare capacity for other connections that are never made?

You're not going to solve it imho without some recourse to wired connections.
 
Old 02-28-2017, 06:23 AM   #7
maxf130
LQ Newbie
 
Registered: Feb 2017
Location: Aberystwyth
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
With a wired connection (1Gbit ethernet) directly between the router and the same test machine I can achieve throughput of ~750Mbits/sec in iperf.

The internet was never a consideration here. The stated speeds are all between the router and test machine.
 
Old 03-01-2017, 03:55 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Router to cable 750G/S is good. But you're leaving out the interesting bit.
cable --> router --> wifi is what I want to know about.
 
Old 03-02-2017, 07:19 AM   #9
briselec
Member
 
Registered: Jun 2013
Location: Ipswich, Australia
Distribution: Slackware
Posts: 74

Rep: Reputation: Disabled
Firstly upgrade to iperf3, it's results are more accurate than the older version.
Run iperf tests with '-t 30'. Number of Retries should be close to zero and Cwnd
should generally increase with time, otherwise you've got problems somewhere.

Is there anything else using the wireless network. A slow device can adversely affect the whole wireless network.

You list an a/c WNIC at the laptop but state it's a 802.11n network so I assume the WNIC on the other end is an n type.
Does it support 5GHz? How many antennas are there at both ends?

By the way that reported 150Mbits/sec link speed is purely theoretical. Protocol overheads and the unique problems of wireless networking means don't expect anywhere near that in throughput.
 
Old 03-02-2017, 07:42 AM   #10
maxf130
LQ Newbie
 
Registered: Feb 2017
Location: Aberystwyth
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by briselec View Post
You list an a/c WNIC at the laptop but state it's a 802.11n network so I assume the WNIC on the other end is an n type.
Does it support 5GHz? How many antennas are there at both ends?

By the way that reported 150Mbits/sec link speed is purely theoretical. Protocol overheads and the unique problems of wireless networking means don't expect anywhere near that in throughput.
The nic in the router supports AC in principle, but no other devices on the network do. As far as I know it can only operate in either 2.4GHz or 5GHz mode, not both simultaneously. Since there are some 2.4GHz only devices on the network, I'm running in 2.4GHz mode for the time being.

Both ends have two antennas as far as I am aware.

I know that the stated link speeds are theoretical only. I have however seen throughput in excess of 80Mbits/sec on a similarly rated network in the same location using a different AP. I have tried temporarily running in 5GHz mode. That did not help.
 
Old 03-12-2017, 05:27 AM   #11
maxf130
LQ Newbie
 
Registered: Feb 2017
Location: Aberystwyth
Distribution: Slackware
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
Router to cable 750G/S is good. But you're leaving out the interesting bit.
cable --> router --> wifi is what I want to know about.
I see. For the time being I have no other 1Gbit Ethernet devices that I can test with. I will have to wait a while and get back on that later unfortunately.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AR5B93 atheros 802.11n 2x2 slow throughput keratos Linux - Hardware 0 04-18-2014 02:44 PM
[SOLVED] Using hostapd and isc-dhcp-server to create a wireless access point resuni Linux - Networking 2 03-08-2014 08:46 PM
[SOLVED] Want suggestions for 802.11n wireless card for 64-bit Slackware 14. bgbarcus Linux - Wireless Networking 2 10-04-2012 08:42 PM
LXer: Turn your Linux computer in a wireless access point using hostapd LXer Syndicated Linux News 0 08-27-2010 11:00 AM
making a 802.11n access point out of a laptop? emaayan Linux - Laptop and Netbook 4 05-12-2009 12:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration