[ntp:questions] Difficulties on a Xen vm

David Woolley david at ex.djwhome.demon.invalid
Fri Oct 1 20:57:33 UTC 2010


Eric W. Bates wrote:
> I'm having a great deal of trouble maintaining a stable time on a Xen 
> vm. It will repair the offset on initial start-up and then allow the 

Do Xen make any claim to support ntpd in guests.  There are reports that 
VMWare have changed their advice on this, but even then you need special 
support in the host and to use the right local clock source for the 
guest kernel.

> clock to drift quite dramatically (hardware clocks on VM's being more 
> than a little screwy).

If that 7 seconds was in 30 minutes, that is almost an order of 
magnitude greater than the maximum static drift rate that ntpd can 
handle, and about 3 orders of magnitude greater than the medium term 
variations it would expect to tolerate reasonably.

> 
> This is FreeBSD 8.1-RELEASE-p1. I'm running with what is primarily a 
> stock freebsd ntp.conf with the exception that I'm peering with my other 
> machines:

Why are you including as a peer a machine that clearly is not going to 
be reliable?

> I have read that use of maxpoll is discouraged by non-cognoscenti; so in 
> this case, I'm bowing to the FreeBSD authors.

Not going to be an issue here.  However overriding maxpoll tends to be a 
vote for ntpd's transient handling being broken.

> 
> Running a tcpdump shows ntp traffic back and forth to the other servers. 
> However the packets leaving this machine include:
> Leap indicator: clock unsynchronized (192), Stratum 0, poll 6s, 
> precision -17

Because you are either not synchronised, or just recovering from a step. 
  ntpd requires 0.128 seconds or less offsets to consider that it has a 
tolerable lock.

> 
> The other 3 peering machines list this one as: stratum 16, poll 64, reach 0

That's consistent with a machine in alarm.  Stratum 0 in the packet 
really means stratum 16.
> 
> Eventually, it starts syncing with bindcat again and allows the peers to 
> sync again. Usually it will be happy for several days; but then a 
> similar cycle will begin again. I have seen it drift as far as 110 
> seconds. Meanwhile my Nagios is in alarm state.

Try stopping all the other guests on the host, permanently!
> 
> I would love to have this be stable. I am stumped.
> 
>  ** root at smtp4 ** ~ ** Thu Sep 30 11:28:03
> # ntpdc
> ntpdc> peers

Please use ntpq.  If you must use ntpdc, use dmpeers.  ntpdc billboards 
will confuse people, and, without dmpeers, there is no indication as to 
false tickers, etc.

This is a Xen issue, not an ntpd one.




More information about the questions mailing list