Random latency ping spikes

I had a problem that presented very similarly to yours: excellent ping over wifi, except that every 6 seconds or so it would spike up to 100-200 ms. This was true regardless of the wifi network I was on, or the router hardware. I had no issue when connected via ethernet.

My problem ended up being related to a program which was regularly scanning for wifi networks. I found I could reliably cause my ping to increase in that same way by clicking on the wifi notification icon, which causes the OS to scan for new networks.

I looked in my wifi log (/var/log/wifi.log) and found entries like the following:

Tue Sep 12 11:38:59.570 <airportd[75]> WARNING: Google Chrome (412) is not entitled for com.apple.wifi.scan, temporarily allowing request with background priority —— all entitlement requirements will be strictly enforced in a future release
Tue Sep 12 11:39:04.984 <airportd[75]> WARNING: jtmc (109) is not entitled for com.apple.wifi.scan, temporarily allowing request with background priority —— all entitlement requirements will be strictly enforced in a future release

The application 'jtmc' (a diagnostic app for the Jive phone system) turned out to be the culprit. After closing it and removing it from my login items, pings went back to consistent 1-2ms to the router.