Choppy Wifi caused by locationd
I'm on MacOS 10.13.3 (MBP 2016 and MBP 2017) and have a strange issue with the quality of my wifi connection.
I originally noticed that my video conferencing software suffered from choppy experience (audio/video would get briefly delayed or interrupted every minute or so). So I started troubleshooting. I noticed that ping to my default gateway (home or office router) had strange slowdowns every once in a while (see below). I opened Console and noticed that Mac rescans available wifi networks fairly often every minute or so) and sometimes the rescan runs 4-6 times in a row. Always initiated by locationd process. These wifi rescans also correspond to my connectivity issues.
To somewhat help with this issue, I ended up killing -9 navd process (which seemed to be one of the frequent triggers) and disabled Location Services in my Privacy settings. Unfortunately, disabling Location Services doesn't eliminate the wifi rescans- it only prevents locationd from sharing the results (as seen in Console: "WIFI_LOC: location services are disabled, ignore scan result").
This issue surfaced with the upgrade to High Sierra and I verified the behavior on multiple wifi networks and two different MBP.
Is there any way to get a relief from this issue? Stable wifi connectivity is very important to my job and using Ethernet adapter (which, btw, resolves this issue) is mostly not an option.
Ping (ping -c 1000 -i 0.1 -s 1500 192.168.1.1):
...
1508 bytes from 192.168.1.1: icmp_seq=61 ttl=64 time=1.586 ms
1508 bytes from 192.168.1.1: icmp_seq=62 ttl=64 time=1.430 ms
1508 bytes from 192.168.1.1: icmp_seq=63 ttl=64 time=4.290 ms
1508 bytes from 192.168.1.1: icmp_seq=64 ttl=64 time=3.728 ms
1508 bytes from 192.168.1.1: icmp_seq=65 ttl=64 time=2.699 ms
Request timeout for icmp_seq 66
Request timeout for icmp_seq 67
Request timeout for icmp_seq 68
Request timeout for icmp_seq 69
1508 bytes from 192.168.1.1: icmp_seq=66 ttl=64 time=481.901 ms
Request timeout for icmp_seq 71
Request timeout for icmp_seq 72
Request timeout for icmp_seq 73
Request timeout for icmp_seq 74
Request timeout for icmp_seq 75
1508 bytes from 192.168.1.1: icmp_seq=67 ttl=64 time=935.170 ms
1508 bytes from 192.168.1.1: icmp_seq=68 ttl=64 time=833.174 ms
1508 bytes from 192.168.1.1: icmp_seq=69 ttl=64 time=732.487 ms
1508 bytes from 192.168.1.1: icmp_seq=70 ttl=64 time=627.887 ms
1508 bytes from 192.168.1.1: icmp_seq=71 ttl=64 time=527.319 ms
1508 bytes from 192.168.1.1: icmp_seq=72 ttl=64 time=429.748 ms
1508 bytes from 192.168.1.1: icmp_seq=73 ttl=64 time=327.237 ms
1508 bytes from 192.168.1.1: icmp_seq=74 ttl=64 time=227.283 ms
1508 bytes from 192.168.1.1: icmp_seq=75 ttl=64 time=127.410 ms
1508 bytes from 192.168.1.1: icmp_seq=76 ttl=64 time=26.772 ms
1508 bytes from 192.168.1.1: icmp_seq=77 ttl=64 time=481.695 ms
1508 bytes from 192.168.1.1: icmp_seq=78 ttl=64 time=382.614 ms
1508 bytes from 192.168.1.1: icmp_seq=79 ttl=64 time=282.799 ms
1508 bytes from 192.168.1.1: icmp_seq=80 ttl=64 time=180.891 ms
1508 bytes from 192.168.1.1: icmp_seq=81 ttl=64 time=75.931 ms
1508 bytes from 192.168.1.1: icmp_seq=82 ttl=64 time=1.425 ms
1508 bytes from 192.168.1.1: icmp_seq=83 ttl=64 time=560.851 ms
1508 bytes from 192.168.1.1: icmp_seq=84 ttl=64 time=460.435 ms
1508 bytes from 192.168.1.1: icmp_seq=85 ttl=64 time=360.200 ms
1508 bytes from 192.168.1.1: icmp_seq=86 ttl=64 time=260.067 ms
1508 bytes from 192.168.1.1: icmp_seq=87 ttl=64 time=158.118 ms
1508 bytes from 192.168.1.1: icmp_seq=88 ttl=64 time=816.694 ms
1508 bytes from 192.168.1.1: icmp_seq=89 ttl=64 time=715.863 ms
Request timeout for icmp_seq 99
Request timeout for icmp_seq 100
Request timeout for icmp_seq 101
Request timeout for icmp_seq 102
1508 bytes from 192.168.1.1: icmp_seq=90 ttl=64 time=1384.193 ms
1508 bytes from 192.168.1.1: icmp_seq=91 ttl=64 time=1283.824 ms
1508 bytes from 192.168.1.1: icmp_seq=92 ttl=64 time=1180.031 ms
1508 bytes from 192.168.1.1: icmp_seq=93 ttl=64 time=1075.527 ms
1508 bytes from 192.168.1.1: icmp_seq=94 ttl=64 time=972.461 ms
...