[ntp:questions] ntp too agressive on clock changes

unruh unruh at invalid.ca
Sat Apr 13 23:32:42 UTC 2013

On 2013-04-13, website.reader3 at gmail.com <website.reader3 at gmail.com> wrote:
> I am running Ubuntu 12.04 LTS, running v4.2.6 ntp, but I am finding that ntp is too agressive on clock changes.  The loopstats show clock changes up to 0.11+ secs which is way too high.  I just set the ntp.conf parameter "slewalways" to "yes", hoping that the maximum clock adjustment will be in the neighborhood of 0.5 msec.

Your changes mean that there is something seriously wrong. Any clock
which has offsets of .1 sec after a few hours means that either the
clock that the computer is being compared to is broken, of the computer
itself is broken. ntpd especially is VERY conservative in its change of
clock rates. 

> In the meantime, I am trying to replace the std CMOS clock with a +/- 2ppm precision oscillator so I don't have big startup time deltas (I have seen 2 secs at times).  Yes, I know a precision pps board using a GPS disciplined clock is the best way to go here, but I have to make due with an accurate RTC and ntp.

2PPM means one second in a few days. It 2PPM is horribly inaccurate for
a clock which is supposed to track time over a timespan of days. 

Also you can get chrony, and hwclock to figure out the rate error of
your rtc, and get better accuracy than that. (but not if you have the 11
minute kernel mode activated. That makes it impossible for anything to
figure out what the rate error is of the rtc. Run chrony instead of

> Are there any other things I need to set, so ntp won't adjust the sys clock with steps greater than 0.5 msec ?  I run a program during the day which does hundreds of thousands of time stamps, and found that it had glitches due to clock changes being more than it could tolerate.

Then you have something badly set up. Maybe it is a virtual machine.
Maybe something else is setting the clock behind the back of ntpd. Or
maybe you are using a really really bad time server. 


More information about the questions mailing list