6 ms·
I ran into this the other day and did a video about it - not the best quality video but shows it happening in realtime with analysis and commentary: https://www
by herpderperator 4y ago
I ran into this the other day and did a video about it - not the best quality video but shows it happening in realtime with analysis and commentary: https://www.dropbox.com/s/hra2uxx66kf7z0j/PXL_20220609_214802355_stripped.mp4?dl=0 https://www.dropbox.com/s/hra2uxx66kf7z0j/PXL_20220609_21480...
The cause in this case was AWDL (Apple Wireless Direct Link.) Holding the Option key while clicking the Wi-Fi icon and clicking "Enable Wi-Fi Logging" and then checking /var/log/wifi.log will show AWDL scans starting and ending randomly, and when the scan is active it causes latency spikes every 1s like clockwork. Unrelated to AWDL, but if a process is requesting a Wi-Fi network scan (different from an AWDL scan), /var/log/wifi.log will also tell you the name of the process, such as "locationd" when the Location Service needs your location. (Tangential, but the locationd process rarely causes these latency spikes for me - on a default macOS install it very rarely requests scans in my experience, backed by my analysis of the log.)
AWDL has to be used for things like AirDrop, so it's expected to have this latency increase while you have the AirDrop window open scanning for nearby devices / sending files to other devices. There are other uses of AWDL (AirPlay, Auto Unlock, Universal Clipboard at the very least)[0], but I don't know what was triggering it so actively in my case... and why it wasn't happening on my M1 Air. It also wasn't always happening in the background like this, it just started that day.
The "fix" was to disable the awdl0 interface, but that may also cause AirDrop/AirPlay and related services to not function (I did not test.) It's easy to re-enable it though.
To disable:
ifconfig awdl0 down
To enable:
ifconfig awdl0 up
Upon disabling, the latency spikes go away permanently.
[0] https://owlink.org/wiki/ https://owlink.org/wiki/
- saagarjha 4y agoThere’s a ton of things on macOS that just randomly start network scans and just destroy Wi-Fi performance. I helped Martin find on in the post, but personally I dealt with another one for several months on my own computer and eventually just gave up. I just went ahead and rewired my house with MoCA and now I get the speeds I was looking for, continuously and without the hassle, whenever I’m at my desk. I’d recommend everyone else to do the same, honestly. (Unless you’re at Apple. Then you should not do this and instead send in Radars when your network performance drops.)
- giantrobot 4y ago> (Unless you’re at Apple. Then you should not do this and instead send in Radars when your network performance drops.) Which unfortunately will get moved to NMOS/Future with a P6 priority and ignored forever. At best it'll get sent back to you "for more details". If you play the game an attach logs and investigation it'll get filed make into a black hole milestone or closed as a duplicate. There's a cabal that seems to only want new features and never tackle existing bugs in the OS.
- exikyut 4y ago> There's a cabal that seems to only want new features and never tackle existing bugs in the OS. Huh. That sounds strikingly similar to the culture breakdowns I've observed be associated with Google - the whole focus on newness and landing features in the name of solving hard problems, as opposed to maintaining stuff. Apparently the feedback/peer review/bonus system is completely broken. ...Maybe this sort of scaling problem is a "$T+ market cap" thing that we've just never had to figure out before?
- giantrobot 4y agoWith Apple there's a pathological need to release new devices and OSes on a yearly cadence. Landing a new feature rewards middle management and the top quintile of ICs with cash/stock bonuses and reflects on their end of year review. Fixing bugs does not get those rewards so there's little incentive to fix old bugs that 1) don't prevent a new feature's implementation or 2) aren't called out in a security release. > ...Maybe this sort of scaling problem is a "$T+ market cap" thing that we've just never had to figure out before? I don't know in all honesty. I'm sure part of it has something to do with the fact these companies have billions of customers. It's a mind numbing number of users. Even a single percentile change in the number of customers or revenue per customer makes for huge revenue differences. So given a finite amount of developer effort, a new feature which is likely to increase revenue is incentivized over a stupid AirPlay bug that isn't likely to increase revenue.
- throwawayFanta 4y ago
- aaaaaaaaaaab 4y agoOmg! This may very well solve my ping issues in webliero!
- aaaaaaaaaaab 4y agoUpdate: yes, after `ifconfig awdl0 down` my ping was no longer shooting up to ~200ms randomly, and I was able to play a 2-hour deathmatch with my wife without a single lag!