On Oct 14, 2009, at 2:10 PM, PGNet Dev wrote:
Right, OK-- from your earlier mail, you mentioned something about running with Xen Dom0/DomU. There is absolutely no point to running ntpd in a guest domain-- you should only try to run ntpd in a normal OS, or, as a last
resort, in the Dom0 domain.

actually, that's not at all the recommendation I've repeatedly been
getting from numerous sources.

Which are?

A google of "ntpd DomU" returns numerous reports of problems with this, and the strong recommendation is to only run ntpd in Dom0 using independent_wallclock set to 0, *unless* your DomU's then fail to keep sane time. For example:

  http://www.nabble.com/Unable-to-set-system-clock-on-domU-td22042252.html

The other domains can and should simply use the
HW clock, because latencies and such for the guest domains are highly
unpredictable.

which is why the recommendation is to sync EVERY Dom0/DomU against an
accurate clock via ntpd ...

Why, when ntpd in a DomU *can't* actually change the HW clock?  See: 
http://xen.epiuse.com/xen-faq.txt

Q: Where does a domain get its time from?

A: Briefly, Xen reads the RTC at start of day and by default will track that with the precision of the periodic timer crystal. Xen's estimate of the wall-clock time can only be updated by domain 0. If domain 0 runs ntpdate, ntpd, etc. then the synchronised time will automatically be pushed down to Xen every minute (and written to the RTC every 11 minutes, just as normal x86 Linux does). All other domains always track Xen's wall-clock time: setting the date, or running ntpd, on these domains will not affect their wall-clock time. Note that the wall-clock time exported by Xen is UTC --- all domains must have appropriate timezone handling (i.e. a correct /etc/localtime file).

Seriously, each physical machine only has one RTC and crystal oscillator. It's useful to run one instance of ntpd in the Dom0 context where it can actually work and keep this real hardware clock in sync. Running ntpd's in the other DomUs is almost entirely pointless; it might be useful only if Dom0->DomU time is busted, and even in that case, ntpd is unlikely to ever obtain good time synchronization running in a DomU. You are better off running ntpdate (or sntp) periodically via cron in the DomUs.

Regards,
--
-Chuck

_______________________________________________
timekeepers mailing list
[email protected]
https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers

Reply via email to