Page 1 of 1

WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Thu Feb 18, 2021 10:26 pm
by sacedo
Hi folks, I'm stuck with some wifi issues, already tried multiple things and expended hours searching on internet but nothing seems to work.. I have an RB4011iG and Wifi 5Ghz works perfectly fine but 2.4Ghz don't. Here is a summary of what I've tried so far:

- Check for interference around, there's no device that might be causing it, no microwaves or similar.
- Scanned the wifi spectrum and fixed the channel to 1, also tried 6 and 11
- Set to 20 Mhz channel n-only, also tried g/n
- Tried the legacy firmware version 6.47.9. (This is the current version installed)
- Set regulatory-domain and country, tried Argentina (where I'm located) but actually setting it to United States works better (way much better in 5Ghz)
- Set the antenna gain to 3db which is the information I got for this model
- Tried security profile to open to discard any issue with auth
- Tried with another router, different brand (Netgear r7000) on the same spot and it works fine
- In Mikrotik I can reach 100Mbps on 5Ghz and also with the Netgear router on 2.4Ghz I can get the same speed but not with Mikrotik on 2.4Ghz, it only get ~22Mbps
- Tried multiple other things but the ones above are the most relevant to post here I think

Here are my settings for the 2.4Ghz interface:
 0  R name="wlan-2.4GHz" mtu=1500 l2mtu=1600 mac-address=74:4D:28:EB:C0:D7 arp=enabled disable-running-check=no interface-type=Atheros AR9300 radio-name="744D28EBC0D7" mode=ap-bridge ssid="Nojodas 2.4Ghz" area="" frequency-mode=regulatory-domain
      country=united states installation=indoor antenna-gain=3 frequency=2412 band=2ghz-onlyn channel-width=20mhz secondary-channel="" scan-list=default wireless-protocol=any rate-set=default supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps
      supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps basic-rates-b=1Mbps basic-rates-a/g=6Mbps max-station-count=2007 distance=dynamic tx-power-mode=default noise-floor-threshold=default nv2-noise-floor-offset=default
      vlan-mode=no-tag vlan-id=1 wds-mode=disabled wds-default-bridge=none wds-default-cost=100 wds-cost-range=50-150 wds-ignore-ssid=no update-stats-interval=disabled bridge-mode=enabled default-authentication=yes default-forwarding=yes
      default-ap-tx-limit=0 default-client-tx-limit=0 wmm-support=disabled hide-ssid=no security-profile=default wps-mode=disabled station-roaming=disabled disconnect-timeout=3s on-fail-retry-time=100ms preamble-mode=both compression=no
      allow-sharedkey=no station-bridge-clone-mac=00:00:00:00:00:00 ampdu-priorities=0 guard-interval=any
      ht-supported-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15,mcs-16,mcs-17,mcs-18,mcs-19,mcs-20,mcs-21,mcs-22,mcs-23 ht-basic-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7
      tx-chains=0,1 rx-chains=0,1 amsdu-limit=8192 amsdu-threshold=8192 tdma-period-size=2 nv2-queue-count=2 nv2-qos=default nv2-cell-radius=30 nv2-security=disabled nv2-preshared-key="" nv2-mode=dynamic-downlink nv2-downlink-ratio=50
      nv2-sync-secret="" hw-retries=7 frame-lifetime=0 adaptive-noise-immunity=none hw-fragmentation-threshold=disabled hw-protection-mode=none hw-protection-threshold=0 frequency-offset=0 rate-selection=advanced multicast-helper=default
      multicast-buffering=enabled keepalive-frames=enabled skip-dfs-channels=disabled pci-info="01:00.0"
Ping is terrible even super close to the router (~2mts)
64 bytes from 192.168.10.1: icmp_seq=41 ttl=64 time=113.826 ms
64 bytes from 192.168.10.1: icmp_seq=42 ttl=64 time=92.001 ms
64 bytes from 192.168.10.1: icmp_seq=43 ttl=64 time=63.102 ms
64 bytes from 192.168.10.1: icmp_seq=44 ttl=64 time=210.995 ms
64 bytes from 192.168.10.1: icmp_seq=45 ttl=64 time=116.879 ms
64 bytes from 192.168.10.1: icmp_seq=46 ttl=64 time=1.060 ms
64 bytes from 192.168.10.1: icmp_seq=47 ttl=64 time=1.282 ms
64 bytes from 192.168.10.1: icmp_seq=48 ttl=64 time=83.281 ms
64 bytes from 192.168.10.1: icmp_seq=49 ttl=64 time=7.684 ms
64 bytes from 192.168.10.1: icmp_seq=50 ttl=64 time=53.256 ms
64 bytes from 192.168.10.1: icmp_seq=51 ttl=64 time=457.685 ms
64 bytes from 192.168.10.1: icmp_seq=52 ttl=64 time=203.388 ms
Request timeout for icmp_seq 54
64 bytes from 192.168.10.1: icmp_seq=53 ttl=64 time=2327.572 ms
64 bytes from 192.168.10.1: icmp_seq=54 ttl=64 time=1900.083 ms
64 bytes from 192.168.10.1: icmp_seq=55 ttl=64 time=936.633 ms
64 bytes from 192.168.10.1: icmp_seq=56 ttl=64 time=505.913 ms
64 bytes from 192.168.10.1: icmp_seq=57 ttl=64 time=125.049 ms
64 bytes from 192.168.10.1: icmp_seq=58 ttl=64 time=52.499 ms
64 bytes from 192.168.10.1: icmp_seq=59 ttl=64 time=159.346 ms
64 bytes from 192.168.10.1: icmp_seq=60 ttl=64 time=135.667 ms
64 bytes from 192.168.10.1: icmp_seq=61 ttl=64 time=167.241 ms
64 bytes from 192.168.10.1: icmp_seq=62 ttl=64 time=219.160 ms
64 bytes from 192.168.10.1: icmp_seq=63 ttl=64 time=106.832 ms
64 bytes from 192.168.10.1: icmp_seq=64 ttl=64 time=252.319 ms
64 bytes from 192.168.10.1: icmp_seq=65 ttl=64 time=162.225 ms
I'm testing speed with fast.com and ping with regular terminal using a Macbook Pro but also tried from iPhone, Android and Windows with the same results

At this point I'm not sure if there's actually hardware issues with my Mikrotik and I don't have another one similar to test, I really appreciate your help here since this is driving me crazy and I want to see light at the end of the tunnel but it is still dark

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Fri Feb 19, 2021 11:04 am
by bpwl
You should check the 2.4GHz wifi connection and RF area.

- connection: see in "Wireless" "Registrations" what the values are for that connection . TX rate, RX rate, SNR, Signal strength, CCQ, TX frames versus TX hw frames. I expect CCQ far below 90%.

-area: do a check on free 2.4 GHz spectrum to see if there is any time left to transmit on freq 2412. Use "Freq Usage" and "Snooper" on the interface (channel 1-2-3 ( actually2402-2422) should have free airtime to be able to use freq 2412.) In CLI you can do a spectral scan !

- double check that WLAN1 (2.4GHz) is coupled to the bridge the same way as WLAN2 (5GHz) is. Probably is the case, as there are some normal (1 ms) values.

-1000 ms PING (RTD) time is not a small wifi performance problem. It's a major roadblock. Should be very visible in the tests above.

Long-Term version is not "legacy". It is the recommended version to use, unless you have urgent needs that are added in "Stable", which you can use then while taking taking the risk.

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Wed Feb 24, 2021 7:06 pm
by sacedo
Thank you @bpwl for your reply, really appreciate it. Regarding your suggestions here are the results:

- connections:
   mac-address       |       tx-rate       |      rx-rate    |      signal-strength     |    signal-to-noise  |    tx-ccq
C8:2B:96:60:EB:EA    |    65Mbps-20MHz/1S/SGI   |    48Mbps     |       -71dBm@6Mbps    |      30      |   63
D8:F1:5B:C3:50:A8    |    28.8Mbps-20MHz/1S/SGI  |    36Mbps    |       -75dBm@1Mbps    |      26     |   54
2E:9B:00:43:DA:35    |    6Mbps       |    144.4Mbps-20MHz/2S/SGI     |   -50dBm@1Mbps    |      51    |   40
The first 2 devices are IoT (light switches) located a few walls apart from the router, the third one with mac ending in DA:35 is an iPhone located in the same room as the router (terrible CCQ)

- area: it doesn't look that bad, right?? see below
/interface wireless> frequency-monitor
number: 0
         FREQ          USE         NF
      2412MHz        20.1%       -100
      2417MHz        19.7%       -103
      2422MHz        20.2%       -103
      2427MHz        11.1%       -102
      2432MHz        23.9%       -103
      2437MHz        22.2%       -102
      2442MHz        19.3%       -102
      2447MHz        16.7%       -103
      2452MHz        19.8%       -101
      2457MHz        24.9%       -100
      2462MHz        24.5%       -102

/interface wireless snooper> snoop wlan-2.4GHz
CHANNEL                                                                                                                                 USE        BW NET-COUNT NOISE-FLOOR STA-COUNT
2447/20/gn(27dBm)                                                                                                                     28.1% 174.3kbps         4        -103         7
2412/20/gn(27dBm)                                                                                                                     17.9% 138.6kbps        15        -102        18
2417/20/gn(27dBm)                                                                                                                     16.1%  88.5kbps         2        -102         4
2422/20/gn(27dBm)                                                                                                                     12.5%  53.6kbps         2        -102         7
2427/20/gn(27dBm)                                                                                                                     13.7%  66.2kbps         1        -102         2
2432/20/gn(27dBm)                                                                                                                     15.7%  95.0kbps         3        -102         4
2437/20/gn(27dBm)                                                                                                                     31.2% 183.1kbps        20        -103        22
2442/20/gn(27dBm)                                                                                                                     12.2%  69.5kbps         2        -101         3
2452/20/gn(27dBm)                                                                                                                     22.6% 148.9kbps         5        -100         5
2457/20/gn(27dBm)                                                                                                                       37% 317.6kbps         4         -99         4
2462/20/gn(27dBm)                                                                                                                     29.4% 175.4kbps        19        -101        24
NetSpot scan here: https://imgur.com/a/c4Kx7ak

- The WLAN 2.4Ghz interface is definitely coupled to the bridge
- Than you for the clarification on the long-term version, I'll keep that one.

My conclusion in that environment isn't that bad but I could be reading this wrong, what do you think?

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Wed Feb 24, 2021 7:35 pm
by sacedo
I connected my laptop and CCQ is good (93%) but fast.com shows only 20Mbps download and it doesn't go faster than that (I have a 100Mbps link)
;;; Steiners-MBP
   interface=wlan-2.4GHz mac-address=F8:FF:C2:6A:8D:78 ap=no wds=no bridge=no rx-rate="144.4Mbps-20MHz/2S/SGI" tx-rate="117Mbps-20MHz/2S" packets=480241,145653 bytes=326574439,42736868
   frames=318914,145655 frame-bytes=330187083,41863186 hw-frames=367464,150922 hw-frame-bytes=410176553,48217811 tx-frames-timed-out=0 uptime=41m47s last-activity=0ms signal-strength=-36dBm@6Mbps
   signal-to-noise=67dB signal-strength-ch0=-42dBm signal-strength-ch1=-38dBm
   strength-at-rates=-47dBm@1Mbps 2s30ms,-63dBm@5.5Mbps 40m54s410ms,-36dBm@6Mbps 0ms,-31dBm@HT20-0 43s280ms,-31dBm@HT20-1 25s820ms,-34dBm@HT20-2 9s950ms,-34dBm@HT20-3 11s310ms,-36dBm@HT20-4 1s,-
                  35dBm@HT20-5 24s450ms,-35dBm@HT20-6 24s90ms,-36dBm@HT20-7 0ms
   tx-ccq=93% p-throughput=108139 distance=47 last-ip=192.168.10.31 802.1x-port-enabled=yes authentication-type=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm management-protection=no
   wmm-enabled=yes tx-rate-set="CCK:1-11 OFDM:6-54 BW:1x SGI:1x HT:0-15"

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Wed Feb 24, 2021 8:23 pm
by bpwl
OK. Let me try to explain what I see in your numbers.A busy to very busy 2.4GHz environment.

THE basic principle of wifi (802.11) is that every device waits for any other device that transmits on the same channel. The high signal strength or being closer to the AP gives NO priority.
After the channel is silent , everybody tries to get a slot for transmission (random process), and will take the time needed to do that transmission. (A slow connection will use more time.)
Every SSID will transmit beacons every 10 ms, at the basic rate (6Mbps, but even 1 Mbps if 802.11b is enabled). 1 Mbps is so slow that 30 SSID's would consume all available airtime just for the beacons. (http://revolutionwifi.blogspot.com/p/ss ... lator.html)


- The connection to the iPhone is correct and at MAX for the RX. Having 6 Mbps on TX could be because there is no user traffic at that moment, and you see the beacon speed. But it could also be that there is no user traffic for an unwanted reason. (sometimes Apple devices require specific settings, like WMM enabled). The received signal is strong. Argentina allows 20 dBm for the AP ( interface wireless info country-info argentina) and that's OK. Setting to united states would set it to 30 dBm, that might be too strong, and it's illegal anyway.
- When looking at the freq usage and the Netspot scan, there is the 2.4 GHz chaos. (Probably due to people setting their router to "auto".) The 802.11 channels are 20 MHz wide here. So only 2412, 2437 and 2462 should be used. (Most do, but not all). Channel 2 (2417) and 3 (2422) will cause adjacent channel interference (destructing signal reception) with channel 1. But there are quite some others on channel 1 : 15 SSID's and 18 clients. You will wait for them if they are 6 dBm above the noise floor (above -97dBm). If one of them has a slow link, you will wait a longer time.

What to try?

Setting "adaptive-noise-immunity=none" to "AP and client" could reduce the sensitivity of the AP, and reduce the weak neighboring signals below the detection threshold, avoiding the wait time.
I'm not sure the "noise-floor-threshold=default" could be set to a higher level for an AR9300 type interface. (see the WIKI : https://wiki.mikrotik.com/wiki/Manual:I ... e/Wireless ) to have more impact.
Moving to channel 11 could help. (Less devices with overlapping adjacent channels)

Waiting for others will give low data throughput even with a fast interface connection! The slowest competing interface connection is dominant.

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Thu Feb 25, 2021 3:37 pm
by sacedo
bpwl thank you again for your detailed reply and great technical explanation. I completely get what you say and that overhead calculator chart helps me a lot to understand way much better the situation, I ran NetSpot again and found around 40 SSIDs on channel 1 and other overlapping channels, 2,3... same happens with channel 6 and 11. The worst and more frustrating part is that most of them are routers provided by ISPs with automatic channel selection using all channels available for 2.4Ghz and not specifying to scan and set only 1,6,11.

As you suggested I've set "adaptive-noise-immunity=AP and client" and moved the noise-floor-threshold=default to -115 but didn't help much. Will do more testing moving that threshold value today and see if it helps. Also moved to channel 11 but didn't help either

I'm curious about why the Netgear router I was using for testing was performing better in 2.4Ghz, I guess with Mikrotik I will achieve the same at some point but need to find the right recipe. I've been using Mikrotik since a while but never learned really in deep about Wifi. Is there a reading you would recommend to unlock the secrets and mysteries of Wifi?

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Thu Feb 25, 2021 4:23 pm
by anav
Unfortunately there is nothing documented specific to MT wifi.
Suggest talking to closest neighbours (be it in apt or houses) to ask if they are using ISP WIFI and if they say no and its still ON, to ask them to turn it off LOL.
I tried the TPLINK eap245 wifi and it was more stable for me than the capac wifi and have more direct control of power output. (disclaimer may leak vlan data if using IPv6 protocols).

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Thu Feb 25, 2021 5:49 pm
by bpwl
I never used this, but i assumed noise-floor-threshold=-85 to stay above the levels seen. (Noise floor is only -103, so -115 will not help).
Everything below -85dBm would then just be seen as noise, and not as competing 802.11 senders.

I have been reading many things on the internet. (And following presentations). Quite a long list, but I might share just some favorites, just in the order of my browser links, they are not the bible, make your own judgement on what to use. Some , out of many ... and they point to more similar info (eg more presentations of Keith Parsons or Ron Touw)
( https://www.youtube.com/watch?v=V7D2E0ah5e8, https://www.youtube.com/watch?v=pmtB3LlwquA, https://metis.fi/en/services/ , https://www.mist.com, https://www.duckware.com/tech/wifi-in-the-us.html , https://divdyn.com/blog/ , https://www.7signal.com/news/blog , https://www.oreilly.com/library/view/80 ... index.html (use top right arrow, not the trial button) https://www.helge-keck.com/ , https://community.arubanetworks.com/bro ... f8f5a5e6f8 )

[ Hope not to violate the rules of the forum with all these external links]

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Thu Feb 25, 2021 6:38 pm
by Corin
@sacedo: out of pure curiosity, could you try low lower the values of amsdu-limit and amsdu-threshold from 8192 to something like 2048 or lower or even zero.
They are found in your wireless interface in HT tab.
These options are useful for increasing throughtput but in very noisy environments they do more harm than good...

Re: WiFi 2.4 Ghz terrible ping and throughput on RB4011iGS

Posted: Thu Feb 25, 2021 9:43 pm
by bpwl
I connected my laptop and CCQ is good (93%) but fast.com shows only 20Mbps download and it doesn't go faster than that (I have a 100Mbps link)

;;; Steiners-MBP
interface=wlan-2.4GHz mac-address=F8:FF:C2:6A:8D:78 ap=no wds=no bridge=no rx-rate="144.4Mbps-20MHz/2S/SGI" tx-rate="117Mbps-20MHz/2S" packets=480241,145653 bytes=326574439,42736868
frames=318914,145655 frame-bytes=330187083,41863186 hw-frames=367464,150922 hw-frame-bytes=410176553,48217811 tx-frames-timed-out=0 uptime=41m47s last-activity=0ms signal-strength=-36dBm@6Mbps
This looks like a very good connection (tx-rate="117Mbps-20MHz/2S) with a limited number of retransmits (due to noise or adj channel interference) ( frames=318914,145655 versus hw-frames=367464,150922)) a ratio that leads to good CCQ and to good throughput (tx-ccq=93% p-throughput=108139).

If you only get 20Mbps , the traffic is waiting , either for wifi air-time (or who knows something else in the total data path).

Reducing AMSDU size is indeed very good to handle cases with many retransmits (packet is smaller, chances to fail are smaller, and AMPDU will still assemble AMSDU's but will only selectively retransmit the failed AMSDU's through block-ack)