[ntp:questions] "ntpd -q" is slow compared to ntpdate

Mohit Aron extproxy at gmail.com
Tue Oct 14 06:31:28 UTC 2008

I've ready in numerous places that ntpdate is going to be deprecated and
that one should use 'ntpd -q -g' instead. I have also read complaints by
people that 'ntpd -q -g' is slow, but I haven't read about any suitable
resolution to this issue. My own system uses 'ntpd -q -g' to synchronize
with an Internal time server and the call to 'ntpd -q -g' takes more than 3
minutes to complete. This slows up the startup of my machine.

Here's the /etc/ntp.conf of my client machine (where the our local ntp
server has the IP

logfile /var/log/ntp.log
driftfile /var/log/ntp.drift
restrict default notrust nomodify notrap noquery
server iburst minpoll 4
fudge stratum 11

I also ran a tcpdump to capture the ntp packets being exchanged between the
client and the server. It seems the client sends a total of 13 requests to
the server - each of which is responded to immediately. The first 9 requests
are spaced at period of 2 seconds each. The 10th one is sent one second
after the 9th request. The 11th one is sent 18s after then 10th. The 12th
one is sent 65 seconds after the 11th. Finally, the 13th one is sent 66s
after the 12th one. Personally, I would have been extremely happy if 'ntpd
-q -g' terminated after the first request was sent and the reply was

Issuing 'ntpdate' completes almost instantaneously. Before the
ntp maintainers deprecate ntpdate, it would be wise to provide the
equivalent functionality in ntpd. The current speed of 'ntpd -q -g' is
unacceptably slow. I think it is also unwise to mention in the docs (e.g.,
the man page) that ntpdate is deprecated without providing equivalent
functionality. I've wasted a lot of time configuring our machines to use
'ntpd -q -g' and now all that needs to be reverted back to use ntpdate. If
ntpdate is indeed removed from a later ntp release, I'd have to just compile
ntpdate from an older source version rather than use the dog slow 'ntpd -q
-g' command.

- Mohit

More information about the questions mailing list