WRT1900ACS bridge performance

I have a Linksys WRT1900ACS and it's running LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.152.82987-7f6fc16). The setup is, there is A that's connected to the router wired (1Gbps). And there is B that's connected to the router wirelessly (1300Mbps 5Ghz). The throughput (running dd | nc) between A and router is somewhere 40 MBps, and the throughput between B and router is somewhere 40 MBps as well. But the throughput between A and B is only 4 MBps, which is way too slow and problematic for me.

My guess is that the software bridge is the bottleneck. But when I open up top, the irqs take less than 1% of the CPU.

I wonder if anyone has any insight and can help me figure out more or solve this problem.

Thanks :slight_smile:

I'm using the same router but with 17.01.4, r3560-79f57e422d, i don't have this issue, maybe check your iptables rule?

Thanks for the response. What am I specifically looking at? Currently A and B are in the same subnet (br-lan) so probably it is not governed by iptables?

I just tried splitting the bridge and creating two subnets for wireless and wired. This means now A and B is not layer-2-switched but layer-3-routed. But I still observe the same issue: slow performance between A and B.

I would download iperf3 and benchmark...

https://iperf.fr/iperf-download.php

Thanks for the advice. After testing with iperf3, I found a strangely asymmetric bandwidth behavior. I have three hosts (A, B, and router). Among all 6 (src, dst) pairs, only B->A and Router -> B is very slow. Everything else has normal speed.

"B" is your 5 Ghz wireless connection, correct?

Yes. B is wireless.

SSH in to the router and do a cat /etc/config/wireless

Make sure to obscure the "option key" value(s) in the wireless config results before posting.

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11a'
        option path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0'
        option htmode 'VHT80'
        option country 'US'
        option channel 'auto'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option macaddr 'c2:56:27:cd:da:fc'
        option ssid 'SomeSSID'
        option encryption 'psk2'
        option key 'somepassword'
        option network 'wlan'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option path 'soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0'
        option htmode 'HT20'
        option country 'US'
        option channel 'auto'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option macaddr 'c2:56:27:cd:da:fb'
        option ssid 'SomeOtherSSID'
        option encryption 'psk2'
        option key 'somepassword'
        option network 'guest'

I'm testing using radio0.

Take the channel selection off of "auto" and start with 157.

Make sure WMM is checked.

I set channel to 157 and eventually it uses 161. The problem still exists.

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11a'
        option path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0'
        option htmode 'VHT80'
        option country 'US'
        option channel '157'

Looks like this now.

In Wireless Security, set Force CCMP (AES) for the Cipher.

In Advanced Settings, set Distance Optimization to 1350, Fragmentation and RTS/CTS thresholds to 2346.

Problem still exists :frowning:

One weird thing, while running Router->B, iperf3 reports cwnd also being ~32KB and not growing. (I couldn't get it to show cwnd for B->Router). But Retr is almost always 0.

Connecting to host 192.168.3.115, port 5201
[  4] local 192.168.3.1 port 59264 connected to 192.168.3.115 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   274 KBytes  2.25 Mbits/sec    0   32.5 KBytes
[  4]   1.00-2.00   sec   136 KBytes  1.11 Mbits/sec    0   32.5 KBytes
[  4]   2.00-3.00   sec   143 KBytes  1.17 Mbits/sec    0   32.5 KBytes
[  4]   3.00-4.00   sec   136 KBytes  1.11 Mbits/sec    0   32.5 KBytes
[  4]   4.00-5.00   sec   136 KBytes  1.11 Mbits/sec    0   32.5 KBytes
[  4]   5.00-6.00   sec   148 KBytes  1.22 Mbits/sec    0   32.5 KBytes
[  4]   6.00-7.00   sec   139 KBytes  1.14 Mbits/sec    0   32.5 KBytes
[  4]   7.00-8.00   sec   140 KBytes  1.15 Mbits/sec    0   32.5 KBytes
[  4]   8.00-9.00   sec   133 KBytes  1.09 Mbits/sec    0   32.5 KBytes
[  4]   9.00-10.00  sec   139 KBytes  1.14 Mbits/sec    0   32.5 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.49 MBytes  1.25 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  1.43 MBytes  1.20 Mbits/sec                  receiver

Here 192.168.3.1 is the router and 3.115 is B

Looks like by running iperf3 with -P flag (running multiple threads in parallel), I could get the expected performance. And in the case of Router -> B, even running with -P 2 will get me full speed and a growing cwnd. Now I wonder why cwnd is not growing in single threaded case.

Follow up.

On my router

# cat /proc/sys/net/ipv4/tcp_congestion_control
cubic

So I then tried running

# iperf3 -c 192.168.3.115 -C reno

and now the speed if normal again. Very weird. Now that the case of Router -> B is solved. Let me dig deeper into the case of B -> A.

2 Likes

Good catch on using reno...it improved my iperf3 tests as well.

Just changed my system-wide default and will run with it for a while.

echo reno > /proc/sys/net/ipv4/tcp_congestion_control