I noticed this too when I used steam to stream a game to my laptop over good wifi. Every minute it would stutter for a second. I set up iperf3 tests and noticed the wifi lag increasing every minute between my macbook and my server and between my windows desktop pc and my server (when connected over wifi). Of course no lag when using cables, so I reasoned it was wifi related, and had noting to do with my setup (I used different clients, and different AP's). I then took my macbook (only portable computer I had) it too a nearby coffee shop with good wifi and I could still measure lag spikes every minute. So then I was really puzzled, was there some rogue device interfering with wifi all over the neighborhood? Finally I found a suggestion to turn off location services (or whatever it is called), and the spikes disappeared. And I learnt that even when it is not used (not sure it the lid was closed) a macbook can cause significant interference to the wifi for all other nearby devices.
This is normal across all wifi clients; they can't scan for networks and transfer data simultaneously so there will always be increased latency during that event. You can test this yourself by doing a low-interval ping and clicking the wifi icon to show you nearby networks - you'll notice a brief latency spike.<p>I agree that it's not a good default to have an app doing this, though.
I'm on Wi-Fi on my MacBook (Pro 16" 2021). I opened Maps.app (which gets my location correctly), started pinging my router, it's been a few minutes...<p>No spike. It must be occuring at <i>some</i> corner case, not for everyone.
I discovered this exact problem over lock down 2020. My Teams calls would freeze every 60s.<p>There's a better solution though! Delete all your saved wifi connections. All those hotels and coffee shops you have connected to in your apple lifetime are the trigger. Reduce them down to those you actually use and the problem goes away.<p>I'm amazed more people haven't come across this, though from what I've seen people tend to just live with these problems as they don't know where to start in figuring it out.
On Windows, there was an infamous Qt bug that also caused regular ping spike, so check it out if you have the issue and you also happen to be using a Qt program:<p><a href="https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-40332/comment/390766" rel="nofollow">https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-...</a>
I wonder why they keep rescanning the wifi environment even though the fact that it remains connected to the same BSSID and the RSSI doesn’t fluctuate too much should suggest that it’s very unlikely the device moved far enough to warrant another scan.
I just tried this myself and can't replicate on a 2019 i7 running Big Sur. I wonder if it's related to the number of Wifi networks in range (mine is the only one)... Also, the Apple Maps thing didn't seem to change anything for me, either.
I noticed this when using a meeting/streaming tool that detected these bits of latency and went in to a degraded mode, even with abundant bandwidth available.<p>I tried the various settings for avoiding it, discussed in many other comments here. The only thing that worked for me: get out a USB ethernet adapter and a long wire, don't use WiFi when doing things where it matters.<p>... which is ridiculous; I don't want or need location scans at all, I am sitting stationary in my home office.
Ok that sucks. If they do a scan, at least use the radio that's not in use so it doesn't affect the one communicating (e.g. use 2.4 Ghz when you're connected on 5).. That would be a good way to avoid this latency hit.<p>Also, I'm assuming Maps only does this when it's open, but Apple's annoying tendency to keep an app running when you close the last window (with the exception of system preferences and a few others) makes this very hard to diagnose. While I still used Macs a lot I would always close apps with Command-Q for that reason. This behaviour would exacerbate the problem as the user isn't aware that the app is stil running.<p>Apple's reasoning is I believe to "not worry about open apps, the OS will handle it". But it doesn't always, I often get prompts that my memory is full and I have to close something now or else... And that is with me being rigorous closing apps. My work buys only base level machines with standard ram, unfortunately.
Is this the "weird WiFi latency on Mac OS" thread? I've got a WiFi network with a MacBook Pro (running 11.6 because I hate upgrading) and a System76 linux box (as well as lots of other devices). Both of the machines can ping a google dot com server (which is approximately 150 miles away, going by the hostname) consistently in the 8-12 ms range.<p>Pinging the System76 box from the laptop, the latency varies from 2-250(!) ms. Pinging the laptop from the System76 box varies from 2-125ms.<p>I don't even know where to start debugging that but the latency is driving me crazy.
So I've tried this and cannot reproduce anything like it. Yes, when I tell Macos to scan for network, there is a short latency spike, as can be expected. But _only_ when I open up the networks menu.<p>I have maps open, refresh my location etc. Nothing at all. So there must be some other factors at play. Given the authors wireless woes that I've never had trouble with, I feel like they might just be living in a bunch of farayday cages ;)
This has been an issue for at least over a year.<p>Turn off location services and disable the awdl0 interface is the only way (for me) to run lag free zoom calls over wifi with a mac.<p><a href="https://support.google.com/stadia/answer/9595943?hl=en#zippy=%2Cmac-and-ios-troubleshooting" rel="nofollow">https://support.google.com/stadia/answer/9595943?hl=en#zippy...</a>
Other anecdote: I have a thinkpad L450, and randomly during the day, the wifi firmware just "crashes" and disable itself, and needs to be reset via the "troubleshoot" dialog in windows 10.<p>It's quite annoying, and I can't really think of why it happens.<p>I wonder if radio interference might be a cause.
Why do network scans spike latency? Seems like a WiFi firmware bug to me. I wonder if it happens with open source WiFi firmware like ath9k_htc.fw<p><a href="https://github.com/qca/open-ath9k-htc-firmware" rel="nofollow">https://github.com/qca/open-ath9k-htc-firmware</a>
As a means to keeping this feature on when out in public, but not have it cause latency spikes at home, is it possible to configure the router to block these requests from location services? Or do we need to setup each device to automatically disable location services when on the house wifi?
Best is to disable location services, which results into multiple disadvantages:<p>- maps don't show your location, which you would have to live with..<p>- I recommend F.lux instead of night shift and dark mode: you can manually configure a location in F.lux and let it enable dark mode as well.<p>- also manually set time zone
It's not just Apple Maps either! Even with location services disabled, try opening AirDrop (even on another device you own) while running a ping and you'll see your en0 device's latency spike, while Apple tries to divide traffic between awdl0 and en0.
I see system_profiler doing a scan when I gather the logs. Is that just the logger itself doing something, and if not is there a way to find what it invoking system_profiler?
I’ve seen this sporadically. A reboot clears it for me. I probably spent a good hour trying to figure out if it was my ISP or router. Improve your QA Apple
Silly question - but does this problem occur only when Maps is running? Or is there a background daemon doing this stuff?<p>I've never had this problem on my iMac
lol. i wonder if it's quietly popping the nic out of the associated state, quickly scanning for aps and then jumping back where it left off without telling userland or the remote ap that anything happened...
A bit of a clickbait-y tweet. Exact same thing happens with any OS and Wi-Fi device when briefly scanning for surrounding access points. In the case of my setup (2017 MacBook Air running 10.15/Catalina) the penalty seems forgettable - avg. ping jumps from 2 ms to 25 ms during 1.5 seconds, on 802.11n/5GHz with about 20 other 2.4GHz/5GHz access points in my vicinity. My Asus ZenBook running Linux Mint and equipped with Intel Centrino Wi-Fi suffers a lot more from the same procedure.