WiFi slow with tl-wr2543nd and LEDE 17.01.4-ar71xx


Following this page: https://openwrt.org/toh/tp-link/tl-wr2543nd, my router should be performing at "sustained" 190Mbps. But the iperf3 tests shows that the maximum throughput I am able to achieve is ~24.2 Mbits/sec. The tests were performed installing iperf3 at the router (iperf3 -s) and then at my machine connected via WiFi iperf3 -c -i1 -t 10.

➜  ~ iperf3 -c -i1 -t 10
Connecting to host, port 5201
[  4] local port 59384 connected to port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  2.79 MBytes  23.4 Mbits/sec    0   26.9 KBytes       
[  4]   1.00-2.00   sec  2.91 MBytes  24.4 Mbits/sec    0   52.3 KBytes       
[  4]   2.00-3.00   sec  2.93 MBytes  24.5 Mbits/sec    0   55.1 KBytes       
[  4]   3.00-4.00   sec  2.85 MBytes  23.9 Mbits/sec    0   55.1 KBytes       
[  4]   4.00-5.00   sec  2.87 MBytes  24.1 Mbits/sec    0   55.1 KBytes       
[  4]   5.00-6.00   sec  2.89 MBytes  24.3 Mbits/sec    0   55.1 KBytes       
[  4]   6.00-7.00   sec  2.98 MBytes  25.0 Mbits/sec    0   84.8 KBytes       
[  4]   7.00-8.00   sec  2.97 MBytes  24.9 Mbits/sec    0   84.8 KBytes       
[  4]   8.00-9.00   sec  2.87 MBytes  24.1 Mbits/sec    0   84.8 KBytes       
[  4]   9.00-10.00  sec  2.86 MBytes  24.0 Mbits/sec    0   84.8 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  28.9 MBytes  24.3 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  28.8 MBytes  24.2 Mbits/sec                  receiver

iperf Done.

The card at the router is an Atheros AR9380 Dual-Band 450Mbps 3×3 ABGN, with a maximum link rate of 450 Mbps.

I have configured my wifi for N 5Ghz at 40MHz and the channel is 157. Is that normal? What could be done to improve WiFi performance? When using 2.4Ghz the connection is slower.


You've likely swamped the CPU of the router with iperf itself.

To perform tests like this, you really need iperf or the like running on two machines that aren't your router. First test "a wire" to find out the limits of your test setup.

I found that a Celeron J1900 as an endpoint running netperf couldn't manage the multiple streams that flent uses for its "real world" testing at anywhere near close to GigE speeds.

Hi Jeff, I have also tested that way (A<-->router<-->B). The results are pretty similar: ~20Mbits/sec if using WiFi and ~98Mbps/sec with Ethernet (I'm using CAT5 cables at the moment).

A and B are dual core/quad core computers running Ubuntu. A connected via WiFi and B connected to the router via Ethernet.

1 Like

OK, you're ahead of me already :wink:

Not the snappiest piece of hardware with an ar71xx at 400 MHz and 8/64, but I would think you could do better than 25-100 mbits/sec with it. Any clues in top or htop?

While it wouldn't impact the wired performance, do you have WPA2 and CCMP as your encryption? Disabled legacy rates and a minimum of 802.11n (assuming you don't have any "ancient" devices around)?

Yes, it should be more than 20Mbps! :sweat_smile:

I didn't run a htop, but I did monitor via the CPU utilization on luci and it was very low (less than 20%). When I get home will test again with htop!

My wireless encryption is "WPA2-PSK" and cipher is set to "auto". Should I change it to something else?

How to disable the legacy rates? I thought that explicitly setting "N" and not "Legacy" at the operating frequency mode already did that!

With "Force CCMP (AES)" the performance was a little bit better with a peak at ~32Mbps but with mean close to ~22Mbps, and the CPU performance while performing the iperf3 test were low, < 10%!

My /etc/config/wireless file is:

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:00.0'
        option country 'US'
        option txpower '17'
        option hwmode '11a'
        option channel '157'
        option htmode 'HT40'
        option legacy_rates 0
        option require_mode 'n'

Hi @jeff, any other tip to try? :slight_smile:

After making those adjustments, changing cables to CAT6, and perform a test with more time (iperf with 100 seconds and not 20) the speed went to almost ~80Mbps! The connection begins with very slow and then after 20-30 seconds it goes up slowly till reach ~80Mbps.