macOS - ntpd uses more than 100% of CPU
it happens couple times every day, my MacBook becomes extremely slow. When I check Activity Monitor, I see that ntpd
process uses more than 100% of my CPU (usually around 140-180%).
If I kill it (Force Quit), MacBook starts working as usual. But it will happen again in several hours. How can I fix this issue? It becomes really annoying
It started after one of the software updates (not sure exactly when).
MacBook Pro (Retina, 13-inch, Late 2013) with macOS 10.12.3
Solution 1:
Go to System Preferences > Date and Time and uncheck Set date and time automatically. Close System Preferences, then reopen and re-check Set date and time automatically
Solution 2:
Check if the NTP servers you have configured are correct and reachable.
Open a Terminal window and run
ntpq -p
This is the output I got on my system which had ntpd using around 80-90% cpu.
remote refid st t when poll reach delay offset jitter
==============================================================================
*aer-foo5d20-dc- .GPS. 1 u 23 64 17 17.888 20.617 2.226
aer-foo6t20-dc- .GPS. 1 u 23 64 17 17.938 20.598 2.211
defra1-ntp-001. .INIT. 16 u - 68m 0 0.000 0.000 0.000
This shows that I had 3 ntp server configured, the 2 first ones are ok but the 3rd one was unreachable (I'm no NTP expert but refid=.INIT., st=16 and reach=0 all seem to indicate something is wrong).
So I went to System Preferences > Date and Time , where indeed I had 3 ntp servers configured: 2 inside my company's network, and time.apple.com
- so nothing resembling "defra1-ntp-001".
Assuming "defra1-ntp-001" referred to time.apple.com I removed that one, and this resolved my problem.
Of course in my specific case, probably time.apple.com was unreachable because it is blocked by my company's firewall, so I don't recommend removing it as a general solution. Instead check your 'ntpq -p' output and try to determine which server is causing the problem and remove that one (and if none are left, add a known good one).