[ntp:questions] how long does it take ntpd to sync up

unruh unruh at wormhole.physics.ubc.ca
Sun Aug 28 05:42:53 UTC 2011


On 2011-08-28, Harlan Stenn <stenn at ntp.org> wrote:
> Bill wrote:
>> On 2011-08-27, Harlan Stenn <stenn at ntp.org> wrote:
>>> Bill wrote:
>>>> On 2011-08-27, Chris Albertson <albertson.chris at gmail.com> wrote:
>>>>> Use some logic.  Assume you want to set a mechanical clock's speed
>>>>> by moving the "slow/fast" lever and you can see the time only to
>>>>> the nearest
>>>> 
>>>> Ah yes, but why a) would you want to only adjust it that way, an b)
>>>> why not do a fit and figure outexactly what the rate of the clock is
>>>> and how far out it is, and correct that, rather then simply "shove
>>>> the rate a bit higher if you see the clock time is behind time now,
>>>> and a bit slower if you see the clock is ahead." (which is what ntp
>>>> does).
>>>
>>> Using phrases like "shove the rate a bit" seems pretty disingenuous
>>> to me, Bill.
>> 
>> ?? Not sure what you mean? ntp works by altering the rate in order to
>> eliminate the offsets. Is it the infomality of "shove" you object to?
>
> ntp *does* a fit/figure of the expected needed adjustment - your
> sentence implies that it does not (at least that's how it reads to me).

ntpd, when it is running at least, simply does a feedback system-- if the
time offset on the current measurement is slow, the clock is slowed
down, and if it is fast it is speeded up and this happens at each poll
time essentially. (there is additional bumf about choosing which sources
to trust and choosing which offsets to use, but that is the essential
feature.) Now you may be saying that at startup recent versions of ntp do
a fit to determine the initial rate/offset. That may be. I have not
looked at the source code in a number of years. 

...




More information about the questions mailing list