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

Unruh unruh-spam at physics.ubc.ca
Mon Oct 20 16:38:26 UTC 2008

svein at stillbilde.net (Svein Skogen) writes:

>Hash: SHA1

>Mohit Aron wrote:
>>> Mohit> I don't think '-g' option to ntpd is a practical solution - since
>>> Mohit> takes way too long to set the local time. Given this, people will
>>> Mohit> continue to use ntpdate or sntp to set the time in a one-shot way
>>> Mohit> before actually running ntpd.
>>> Please see http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate and
>>> http://support.ntp.org/bin/view/Support/StartingNTP .
>>> Just because ntpd -g is not right for *your* application doesn't mean it
>>> wrong for everybody.
>>> And in the instances I run, 'ntpd -g' has the machine sync'd and moving
>>> along fine in about 11 seconds.
>> An 11s delay during startup is also unsatisfactory. I've read the links
>> you've posted, and I realize that 'sntp -r <server>' might be an
>> replacement for ntpdate (if that binary were to go away). Ideally I'd
>> that ntpdate just stays - in script form if nothing else. I'm merely
>> responding to your comment that 'ntpd -q -g' was chosen as a viable
>> replacement for 'ntpdate'.

>I've kept out of this topic on purpose, simply because I did not want to
>add anything that people would take as a personal attack (and I failed
>to see how I could vent my feelings without looking like I was starting
>a flame war)

>The way I see this, we're separated into two general camps here. In one
>of the camps we find the purists who more or less on principle wants
>ntpdate gone, because they want everybody to run ntpd. I can understand
>them, even if I do not agree with them.

>The other camp consists mostly of people in the operations environment.
>A lot of them doing remote management of servers. In this camp, any
>additional time in the boot sequence is both wasted time, and a
>nightmare because you always have that nagging "what will go wrong THIS
>time" when you remote reboot anything. I've been there, and I know the

>For the operations people, ntpdate is a supplement to ntpd, not a
>replacement. They run ntpdate to get log timestamps +-1millennium
>correct, then get on with their boot and throw ntpd into the background
>to keep timestamps somewhat trusty.

>Thus, they want ntpdate, or a script just as fast. 'ntpd -q -g' is NOT
>the solution to their problem. Period. A script converting ntpdate
>parameters into 'sntp -r' MAY be the solution.

>However the real problem here is the fundamentalists that seem to want
>ntpdate gone totally. This is a problem I'm afraid noone here can help
>them with. If they have religious reasons for wanting something done or
>gone, I suggest talking to a cleric about them. Sorry if I've insulted
>anybody with this.

No, I think you are misinterpreting their position. They find ntpdate to be
badly written, and to be very difficult to maintain, and to have no
maintainer. They would thus like
to replace it with something quick and simple whose only job would be to
set the clock on the computer to the right time and then go away. They have
a candidate called (I think inappropriately) sntp and would like to
replace ntpdate with that program.
HOwever looking at the source code for sntp, it was written by Neil
Maclaren in 1996 as a competitor to xntp (the old ntpd) and has all sorts
of bells and whistles as a replacement to ntp, and it is not clear that he is maintaining it, or
who is. 
"It supports the full SNTP (RFC 2030) client- and server-side challenge-response
and broadcast protocols."

Ie, it does not really look like an appropriate replacement for ntpdate,
although it does seem to be faster than ntpd -g -q.

See this sentence in the source code
"WARNING: this program has reached its 'hack count' and needs restructuring, badly."
(that was written I believe in 2000). 

It also, like chrony, uses regression rather than ntp's markovian feedback
model in estimating rates and offsets. It is just bizzare to me that it
would be included in the ntp distribution, and being touted as a
replacement for ntpdate.

>Just my ?0.02


>- --
>- --------+-------------------+-----------------------------
>  /"\   |Svein Skogen       | svein at d80.iso100.no
>  \ /   |Solberg Xstli 9    | PGP Key:  0xE5E76831
>   X    |2020 Skedsmokorset | svein at jernhuset.no
>  / \   |Norway             | PGP Key:  0xCE96CE13
>        |                   | svein at stillbilde.net
> ascii  |                   | PGP Key:  0x58CD33B6
> ribbon +-------------------+-----------------------------
>Campaign|msn messenger:     | Mobile Phone: +47 907 03 575
>        |svein at jernhuset.no | RIPE handle:    SS16503-RIPE
>- --------+-------------------+-----------------------------
>  Picture Gallery: http://stillbilde.net/v/svein/
>- ----------------------------------------------------------
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the questions mailing list