[ntp:questions] Re: ntpd Not Converging

David T. Ashley dta at e3ft.com
Fri Nov 4 15:01:27 UTC 2005

"David J Taylor" 
<david-taylor at blueyonder.co.not-this-bit.nor-this-part.uk.invalid> wrote in 
message news:JtKaf.707$Lw5.369 at text.news.blueyonder.co.uk...
> David T. Ashley wrote:
> []
>> But the replies did not zero in on the key question.  It is a control
>> law question.  When ntpd starts and the server time is off of the
>> true time by an offset (say, 2 seconds), what "control law" does it
>> apply to reconverge the server's time and the true time?
> A simple answer would be:
> - if the clock is off by a large amount, it is first stepped
> - a damped control loop is then used to keep the offset approaching zero
> - recognising that there is a fixed rate offset which is the value stored 
> in the drift file

Hi Dave Taylor,

Thanks for your reply.

I have used "tinker step 900.0" in my config file to eliminate the stepping 
behavior.  The reason I've done this is that the web software I'm using uses 
time, microtime, and pid (combined with a spinlock until microtime changes) 
to create unique identifiers used in databases and so on.  Although the 
probability is small, stepping time backwards could in principle destroy 
uniqueness assumptions.

I understand everything you wrote above.  I do have a background in control 
systems, and I understand the word "damped" very well.

However, I've found that when I leave the "drift" file in place, ntpd seems 
to take no convergence action (it just runs the kernel clock at the precise 
rate to keep up, but the static offset remains forever).  So, I'd like to 
understand the control law.

I must qualify that what I mean by "forever" is "at least four hours".  I 
should have let it run over night, but I could see by examining the kernel 
clock settings that ntpd was making no changes.

So, I'd like to understand the control law.

It is my understanding that when ntpd senses a large difference between the 
server time and the external references, it will wait somewhat before it 
will trust the external references.  But I would expect this to happen 
within 4 hours and some corrective action to be taken.  Even a "damped" 
control system will not behave in this way.

So, either the control law is defective, or I don't understand the control 

Best regards, Dave. 

More information about the questions mailing list