We are limited a single NTP upstream source due to political reasons
outside our control and our Ubuntu ntpd loses sync periodically.  I
tried a number of solutions but they all failed.  When I tried setting
the ntpd server's nice value to negative eight it just works.  Clearly
the stability of ntpd is improved by reducing the number of cases in
which ntpd gets preempted by scheduling.

While troubleshooting this I started keeping logs with:

while true ; do ntpq -p | grep name-of-upstream-time-source | logger -t
ntpq -p daemon.info; done

A pair of log entries showing loss of sync looks like:

time                                   remote           refid      st t when 
poll reach   delay   offset  jitter
===================================================================================================================
2010-02-08:2010-02-08T21:53:00-05:00 *xxxx-xxxx.xxx.x 128.59.39.48  2 u   12   
64  377    0.512    0.030   0.098
2010-02-08:2010-02-08T21:54:04-05:00  xxxx-xxxx.xxx.x 128.59.39.48  2 u   11   
64  377    0.512    0.030   0.342

The "*" in the first entry indicates that the local Ubuntu host was
synchronized to the remote host.  The second entry does not contain the
"*" since synchronization was lost.

By changing the nicelevel of the ntpd server process to negative eight
the logs no longer show any loss of synchronization.

See also http://ubuntuforums.org/showthread.php?p=8801540

-- 
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to