2.4GHz, ath9k, 21.02.3, 20/40MHz channel width and unintuitive speeds

Hi,
I've just set up a pair of Mikrotik RBLHG-2nD, flashed them with 21.02.3 and found some strange behavior. When using 802.11n and choosing 20MHz channel width (as there is a lot of interference and I assumed this to be the best setting) the throughput was only around 3MB/s. Then I've tried to see if forced 40MHz channel would do any good (only for the sake of testing of course) and again I saw only around 3MB/s. At last I've tried 40MHz auto setting and the speed essentially capped the Mikrotiks wired side (6MB/s min, 7-8MB/s avg, peaks of 9+MB/s).
How's that possible? Scanning the environment with my phone I see only 20MHz is used (same as is reported in LUCI) when set to 40MHz auto. So that means that 20MHz setting and 40MHz setting should do the same speeds. Why don't they? Why is there a difference between setting 20MHz and setting 40MHz?

if one is in ap mode and the other in station mode try this on tthe devices. looks like you have low speed and alot of interference so this can make things better.

uci set wireless.radio0.chanbw=10
uci commit
wifi

remember this way your phone and other home devices cannot see anymore the essid, only the two devices csn see each other.
just try.

You've misunderstood my question. I don't need to change any settings as the "40MHz" setting (which in reality creates a 20MHz connection) is enough. I want to know why setting it to "20MHz" has any impact on speed whatsoever if the channel width remains the same.

How many times did you measure , did you calculate an average

1 Like

I understand what you are saying, when you set the width to 40mhz and there is a lot of interference, the radio goes back to working at 20mhz wide. since your speed is low I just said to try the chanbw at 10.

I've given each test a window of 30 minutes. I know it's not a long test but when the difference is this big...

No you didn't.
You have 3 choices in LUCI.
20MHz
40MHz
40MHz forced

my results are
20MHz = slow = measured 20MHz channel width with a scanner
40MHz = fast = measured 20MHz channel width with a scanner
40MHz forced = slow = measured 40MHz channel width with a scanner

Hence there has to be something that turns on when you choose 40MHz and don't force it. And I would like to know what's that.

Make sure that WMM is enabled.

Use non-overlapping channels 1, 6, or 11.

Wider channel width simply allows more data to pass through at higher speed.

However, unless you live in a rural area with very few neighbors, do not use 40 MHz channel width on 2.4 GHz.

It will cause interference with your neighbors wireless connections.

Under MAC80211 options, "noscan". You need to set that on your wifi-iface in order for the ath9k device to operate on a 40MHz-wide channel.

I would not advise anyone to use 40 MHz on the 2.4 band in a populated area.

Absolutely. It makes no sense -- a little bit of noise will drown out your signal.

I'm just pointing out how it's to be done. Let folks find out on their own why they shouldn't do this.

That's why we're here...to point out why they shouldn't do it.

It affects their neighbors as well.

Make sure that WMM is enabled.

WMM was always on during testing.

Use non-overlapping channels 1, 6, or 11.

It's on channel 13 (I'm not in US)

Wider channel width simply allows more data to pass through at higher speed.

Sure it does but that doesn't explain anything on the issue I've presented. See my post above yours.

However, unless you live in a rural area with very few neighbors, do not use 40 MHz channel width on 2.4 GHz.

I've forced it only to test it. Makes 0 sense to use anything besides normal 40MHz since both 20MHz setting and force 40MHz setting halves the throughput.

It will cause interference with your neighbors wireless connections.

Honestly this whole place is so congested with ISP blackboxes blasting on full power at 40MHz (I'm looking at you O2) it makes literally no difference.

Guys, again. You are COMPLETELY missing the point.
I've tested 3 different scenarios. Every other setting remained the same.
Mode N, Channel 13, 20MHz channel width = WifiAnalyzer confirmed the channel width (20MHz) = speed around 3-3.5MB/s with iperf3
Mode N, Channel 13, 40MHz channel width = WifiAnalyzer confirmed the channel width (20MHz) = speed around 7-8MB/s with iperf3 with peaks going to 9-9.5MB/s aka the 10/100 wired side of the LHG got saturated
Mode N, Channel 13, 40MHz forced channel width = WifiAnalyzer confirmed the channel width (40MHz) = speed around 3-3.5MB/s with iperf3
Again. I'm NOT asking for better settings. That PtP link is going as strong as the hardware allows. I'm asking WHY is this happening. There either has to be something enabled when choosing 40MHz (without force) or there is a bug in 20MHz setting.

It makes 100% sense when your 40 MHz setting causes interference with your neigbors.

Doesn't matter...1, 6, and 11 are still non-overlapping channels.

Jesus Christ this forum I swear... :man_facepalming:t6:

We all can read just fine without the big bold font.

Nobody's missing the point.

Different versions of iperf on the listener and the sender can give widely different results.

Your device is capable of 802.11n speeds.

Your getting 802.11a-like speeds.

If you want to solve that, start posting config files.

Then find another forum.

Done.

Well, maybe some of the confusion was that you were quoting MByte not Mbit, which is unconventional in wifi terminology. But normal for iperf...

And yes, it would seem that one would expect the lower speeds on the 20 and 40, (assuming it dropping bact to 20 due to challenging neighborhood) and the higher on "force 40". So maybe there's an oddity there. Question, does this dissapear on earlier FW versions? Maybe try an earlier one? Also looks like this device is barely supported, may be some bugs yet. Maybe ask in the development or hardware thread?

I would excuse a bit of zealousness on suggesting not trying to use 40mhz, so many dont get it that the greater bandwidth often is slower than the narrow one, due to more of your neighbors interfering with you, and vice versa. Use the wifi scanner to find the least used/best choice, wherever it is.

No confusion here.

Sorry, shoulda been pointed at the OP