From owner-freebsd-questions@FreeBSD.ORG Thu Dec 17 21:23:44 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9DD2106566B for ; Thu, 17 Dec 2009 21:23:44 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout028.mac.com (asmtpout028.mac.com [17.148.16.103]) by mx1.freebsd.org (Postfix) with ESMTP id B5EDB8FC08 for ; Thu, 17 Dec 2009 21:23:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from cswiger1.apple.com ([17.227.140.124]) by asmtp028.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KUT00BW9FFI4U70@asmtp028.mac.com> for freebsd-questions@freebsd.org; Thu, 17 Dec 2009 13:23:44 -0800 (PST) From: Chuck Swiger In-reply-to: <4B2A9C1E.2010509@comcast.net> Date: Thu, 17 Dec 2009 13:23:41 -0800 Message-id: <3D62B3FC-1385-47C2-A9F3-F81D1597D9A6@mac.com> References: <4B23CD8A.50203@webtent.com> <4B291EB5.5040605@webtent.com> <4B2A9C1E.2010509@comcast.net> To: Steve Polyack X-Mailer: Apple Mail (2.1077) Cc: Robert Fitzpatrick , FreeBSD Subject: Re: slow clock on FreeBSD 7.2 on vmware X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 21:23:45 -0000 Hi-- On Dec 17, 2009, at 1:01 PM, Steve Polyack wrote: > I would really recommend switching to VMware ESXi if at all possible. I have a lot of FreeBSD VMs running under ESXi 3.5 and 4.0 that work just great with kern.hz=100 and openntpd. The "kern.hz=100" recommendation I can certainly agree with, but there is mostly no point in running ntpd or variants anywhere except on the host machine ("host ESX" for VMware, or Dom0 for Xen). For VMware, the vmtools stuff should provide a mechanism to sync time in VMs to the host clock. Regards, -- -Chuck PS: Same thing for Xen, recently discussed on the NTP pool timekeepers list: Begin forwarded message: > From: Chuck Swiger > Date: October 14, 2009 2:43:08 PM PDT > To: PGNet Dev > Cc: timekeepers@fortytwo.ch > Subject: Re: [time] what significance does the number "3.906" have in ntp? > > 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 > timekeepers@fortytwo.ch > https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers