[ntp:questions] Difficulties on a Xen vm

Eric W. Bates eric at educompmv.com
Thu Sep 30 16:38:31 UTC 2010


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 
clock to drift quite dramatically (hardware clocks on VM's being more 
than a little screwy).

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:

[snip]

# The option `iburst' is used for faster initial synchronisation.
# The option `maxpoll 9' is used to prevent PLL/FLL flipping on FreeBSD.
#
server 0.freebsd.pool.ntp.org iburst maxpoll 9
server 1.freebsd.pool.ntp.org iburst maxpoll 9
server 2.freebsd.pool.ntp.org iburst maxpoll 9
#server 3.freebsd.pool.ntp.org iburst maxpoll 9

# Probably important to make sure that all our own machines peer with
# each other
peer smtp3.mydomain.com iburst maxpoll 9
peer smtp2.mydomain.com iburst maxpoll 9
peer fw.mydomain.com iburst maxpoll 9

[snip]

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

Because of iburst, a sync is performed when ntpd is started. The ntpdc 
session below shows the drift increasing over about 30 minutes when, 
finally, a server is chosen from which to sync. Shortly thereafter, the 
sync server is dropped.

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

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

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.

I would love to have this be stable. I am stumped.

  ** root at smtp4 ** ~ ** Thu Sep 30 11:28:03
# ntpdc
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64   37 0.06601  1.972097 0.66312
+75-150-112-177- 208.86.227.252   3   64   76 0.00000  2.764889 0.66237
+75-150-112-180- 208.86.227.252   3   64   77 0.00000  2.694973 0.43567
=dnscache1.izoom 208.86.227.252   2   64   37 0.05040  2.226106 0.66289
+static-141-149- 208.86.227.252   3   64   36 0.00000  2.688963 0.96884
=bindcat.fhsu.ed 208.86.227.252   2   64   77 0.06332  2.126619 0.43546
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64  377 0.08252  4.591225 0.03081
+75-150-112-177- 208.86.227.252   3   64  377 0.00000  4.567796 0.03688
+75-150-112-180- 208.86.227.252   3   64  376 0.00000  4.358072 0.03452
=dnscache1.izoom 208.86.227.252   2   64  377 0.05496  4.563476 0.03096
+static-141-149- 208.86.227.252   3   64  376 0.00000  4.407265 0.03770
=bindcat.fhsu.ed 208.86.227.252   2   64  377 0.06410  4.543536 0.03094
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64  377 0.06604  7.595356 0.03088
+75-150-112-177- 208.86.227.252   2   64  357 0.03517  7.695750 0.03362
+75-150-112-180- 208.86.227.252   3   64  377 0.00000  7.622695 0.03357
=dnscache1.izoom 208.86.227.252   2   64  377 0.04883  7.607783 0.03064
+static-141-149- 208.86.227.252   3   64  377 0.00000  7.671774 0.03705
=bindcat.fhsu.ed 208.86.227.252   2   64  377 0.06372  7.698156 0.03065
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64  377 0.06653  7.807234 0.03099
+75-150-112-177- 208.86.227.252   2   64  357 0.03517  7.695750 0.03362
+75-150-112-180- 208.86.227.252   3   64  377 0.00000  7.943508 0.03384
=dnscache1.izoom 208.86.227.252   2   64  377 0.04715  7.817454 0.03061
+static-141-149- 208.86.227.252   3   64  376 0.00000  7.671774 0.03705
=bindcat.fhsu.ed 208.86.227.252   2   64  377 0.06372  7.698156 0.03065
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64  377 0.06602 10.379082 0.03099
+75-150-112-177- 208.86.227.252   2   64  377 0.03528 10.381183 0.03099
+75-150-112-180- 208.86.227.252   3   64  377 0.03360 10.224393 0.03198
=dnscache1.izoom 208.86.227.252   2   64  377 0.04733 10.352269 0.03082
+static-141-149- 208.86.227.252   3   64  377 0.00000 10.300544 0.03810
=bindcat.fhsu.ed 208.86.227.252   2   64  377 0.06337 10.381435 0.03064
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64   77 0.06683  1.459313 0.03026
+75-150-112-177- 208.86.227.252   2   64   77 0.03963  1.462676 0.43401
+75-150-112-180- 208.86.227.252   3   64   57 0.00000  1.385290 0.66209
=dnscache1.izoom 208.86.227.252   2   64   77 0.05072  1.417518 0.03020
+static-141-149- 208.86.227.252   3   64   37 0.00000  1.298377 0.43500
*bindcat.fhsu.ed 208.86.227.252   2   64   37 0.06450  1.245335 0.02971
ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=mail.freerip.co 208.86.227.252   3   64  377 0.06607  3.256615 0.03069
+75-150-112-177- 208.86.227.252   2   64  377 0.03955  3.253441 0.03185
+75-150-112-180- 208.86.227.252   3   64  176 0.03316  3.155118 0.03172
=dnscache1.izoom 208.86.227.252   2   64  377 0.04744  3.194401 0.03046
+static-141-149- 208.86.227.252   3   64  376 0.00000  3.150439 0.04272
=bindcat.fhsu.ed 208.86.227.252   2   64  377 0.06335  3.253878 0.03088




More information about the questions mailing list