Hey Apple devs,
Has anyone encountered ping spikes on macOS when using WiFi? When you run a constant ping, it looks like this…
64 bytes from 192.168.0.30: icmp_seq=502 ttl=128 time=1.443 ms
64 bytes from 192.168.0.30: icmp_seq=503 ttl=128 time=3.007 ms
64 bytes from 192.168.0.30: icmp_seq=504 ttl=128 time=1.684 ms
64 bytes from 192.168.0.30: icmp_seq=505 ttl=128 time=186.861 ms
64 bytes from 192.168.0.30: icmp_seq=506 ttl=128 time=69.545 ms
64 bytes from 192.168.0.30: icmp_seq=507 ttl=128 time=141.434 ms
64 bytes from 192.168.0.30: icmp_seq=508 ttl=128 time=24.043 ms
64 bytes from 192.168.0.30: icmp_seq=509 ttl=128 time=2.961 ms
64 bytes from 192.168.0.30: icmp_seq=510 ttl=128 time=1.827 ms
64 bytes from 192.168.0.30: icmp_seq=511 ttl=128 time=1.171 ms
Seems to happen reliably when you open the WiFi menu bar on High Sierra. Other apps can cause this too.
I think others are seeing this issue too (especially gamers):
As well as games, real time network apps like Synergy suffer too:
https://symless.com/help/mac-wifi-lag
Cheers,
Nick
Before we start:
I’m presuming that by “spikes” you’re referring to the sections of increased latency.
Also, make sure to read Wi-Fi Fundamentals because I’ll assume terms from there.
Most Wi-Fi hardware only has a single radio, and that radio must be tuned to a specific channel. Thus, the hardware can only work on one channel at a time.
However, there are situations where a STA need to switch channels. For example:
When actively scanning for networks
When an Apple STA is coordinating peer-to-peer Wi-Fi work
While it’s on that temporary channel, the STA can’t be on the channel it’s using to communicating with the AP, and thus you see spikes in latency.
If you want to investigate this further you should read Investigating Network Latency Problems. That shows how to isolate the cause of the latency to one specific subsystem. And, in the C and D case, you can use a Wi-Fi level packet trace to see what’s really happening on the ‘wire’.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"