Router – huge difference in Tx vs. Rx

ethernetnetworkingperformancerouterwifi

I have two computers:

  • (B) Banana Pi – 1 Gigabit Ethernet, Wi-Fi (supports 802.11n)
  • (D) Desktop PC – 1 Gigabit Ethernet, Wi-Fi (2×2 MIMO, supports 802.11n)

And (R) Mikrotik RouterBOARD RB951G-2HnD – Gigabit Ethernet ports, supports 802.11n.

What suprises me a lot is that huge difference in throughputs (using iperf to test):

Scenario 1

(B eth0) – direct point-to-point Ethernet connection – (D eth0)

(D) > (B): ca. 850 Mbps

(B) > (D): ca. 800 Mbps

Scenario 2

(B eth0) – connected via (R), static addressing, i.e. (R) serving as a switch – (D eth0)

(D) > (B): ca. 800 Mbps

(B) > (D): ca. 500 Mbps

Scenario 3

(B eth0) – connected via (R), DHCP from (R) – (D eth0)

(D) > (B): ca. 800 Mbps

(B) > (D): ca. 450 Mbps

Scenario 4

(B wlan0) – connected via (R), DHCP from (R) – (D eth0)

(D) > (B): ca. 25 Mbps

(B) > (D): ca. 25 Mbps

Scenario 5

(B wlan0) – connected via (R), DHCP from (R) – (D wlan0)

(D) > (B): ca. 12 Mbps

(B) > (D): ca. 12 Mbps

Questions:

  • What's happening with (B)'s Tx or (D)'s Rx when connected via (R)? It almost halves (800/450) compared to the direct point-to-point connection (850/800). How can I examine it more in depth or possibly fix it?
  • As (R) is 2×2 MIMO with 300 Mbps PHY data rate capability I think the actual 25 Mbps throughput (see scenario 4) is really poor result. (R) is configured as 802.11n only, 40 MHz channel width, using dual chain (MIMO), signal on (B) and (D) is strong.

Best Answer

First: iperf does not take into consideration the IP overhead. It only looks at the data portion of the packet. So, your numbers will be less than actual data traversing the network.

Second: Microtik boards aren't known to be great "switches". Their throughput varies based on RAM/CPU usage. (the CPU is used to run the linux platform and applications, and also drive the switch. If you have things running on the board, network performance will degrade)

Third: After DHCP is negotiated, any changes you might see in throughput are more likely due to random luck... and not because you're using DHCP.

Fourth: Embedded WiFi sucks. Just because the technology theoretically can operate at 300mbps... does not mean that in the worst-case scenarios you will achieve anywhere near 300mbps. Both the banana-pi and the mikrotik use a trace on the PCB as a quick & dirty antenna. Both appliances can generate sufficient EMI to cause noise in the 2.4ghz band. 2.4ghz is already noisy as hell. Almost everything today uses 2.4ghz. (cell-phones, wireless keyboards/mice, microwave-ovens, etc...) WiFi is convenient... but far from reliable. Also, saying the "signal on (B) and (D) is strong" is a really foolish thing to say. Without knowing the noise-floor, and having actual numbers, your "strong signal" might just mean your wifi-radios can simply hear static very loudly.

Fifth: When you have a wifi-device communicating with another wifi-device through an AP... bandwidth takes a double-hit. Device "D" sends 12mbps of packets to AP, which in-turn sends those 12mbps of packets to Device "B". Meaning 24mbps of bandwidth was consumed.

A few other notes. Using 40MHz channel widths is almost ALWAYS the dumbest thing you can do... and here's why: In the 2.4ghz spectrum, each channel is actually 5mhz wide. Typical old-school 802.11g equipment used 20mhz channel widths. This means that potentially (in the given wifi spectrum) you could have a maximum of 3 channels that wouldn't cause overlapping interference with each other (in the USA and most of the world; 4 in Japan and a few other places). This means that in order to get maximum bandwidth you need to have a solid space of 20mhz (roughly 4 channels) worth of empty spectrum. If you switch to using 40mhz, you're now left with 1 channel of non-overlapping spectrum... consuming the majority of the range. 8-channels out of a potential 11 (again, in the US). To get full-throughput, you need to figure out how to silence 8 whole channels worth of spectrum. Yes, potentially, you can hit 300mbps... (if you saturate all 8 channels) but the likelyhood of 8-channels being clean enough is highly unlikely. Yes... the maximum potential bandwidth of 20mhz is half that of 40mhz... BUT the likelihood of having a 20mhz chunk that is clean-enough is much higher.

Channel Overlap

Related Topic