[ntp:questions] ntpdate works, but ntpd doesn't (reach = 0)

Danny Mayer mayer at ntp.org
Sun Feb 15 18:38:53 UTC 2009


Martin Burnicki wrote:
> Danny,
> 
> Danny Mayer wrote:
>> Martin Burnicki wrote:
>>> Of course synchronization will be better if ntpd reaches an upstream
>>> server continuously, but still this is better than no synchronization at
>>> all ...
>>>
>> No it wouldn't. That's a fallacy. ntpd already oversamples. This is all
>> in the algorithms but sampling at the same rate provides no benefit and
>> it is better off reducing the sampling frequency once it has a stable
>> state.
> 
> What I meant is not to decrease the polling interval.
> 
> I meant to apply corrrections to the system time earlier. If you monitor the
> offset in ntpq -p then you can see often it takes very long untio an
> initial offset of a few milliseconds is started to be decreased.

Again this is all in the algorithms. You need to take care about when
you apply the changes. ntpd tries to figure out whether or not a change
is an aberration or real and then needs to try and make sure it does not
overshoot. Don't forget you are getting values from a number of
different servers and if you switch preference from one server to
another you also end up potentially with perturbing the calculations.

> 
>>> And surely this results in the question which has been discussed here
>>> several times: why does it takes so long for ntpd to adjust an initial
>>> tiny offset of a few milliseconds?
>>>
>> It's easy to overshoot when you have that small of a change.
> 
> The problem is not overshooting, it's just that ntpd applies initial
> corrections very late.
> 

See above.

Danny
> Martin




More information about the questions mailing list