From owner-freebsd-questions@FreeBSD.ORG Mon Jun 9 15:34:11 2008 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 C7F841065671 for ; Mon, 9 Jun 2008 15:34:11 +0000 (UTC) (envelope-from jeff@m2.seamanpaper.com) Received: from buster.seamanpaper.com (buster.seamanpaper.com [67.158.116.43]) by mx1.freebsd.org (Postfix) with ESMTP id 492FF8FC1B for ; Mon, 9 Jun 2008 15:34:11 +0000 (UTC) (envelope-from jeff@m2.seamanpaper.com) Received: (qmail 13936 invoked from network); 9 Jun 2008 11:34:10 -0400 Received: from unknown (HELO junco.intranet.seamanpaper.com) (192.168.10.133) by buster.seamanpaper.com with SMTP; 9 Jun 2008 11:34:10 -0400 Received: (qmail 51810 invoked by uid 0); 9 Jun 2008 15:35:29 -0000 Received: from unknown (HELO ?192.168.10.80?) (192.168.10.80) by 192.168.10.133 with SMTP; 9 Jun 2008 15:35:29 -0000 Message-ID: <484D4D72.7070108@m2.seamanpaper.com> Date: Mon, 09 Jun 2008 11:34:10 -0400 From: Jeff Dickens User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <48499CCD.2010708@m2.seamanpaper.com> <200806062048.m56Kmhtl071591@mail.icsmx.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------090805020304010900090307" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: vmware timekeeping X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jeff@seamanpaper.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 15:34:11 -0000 This is a multi-part message in MIME format. --------------090805020304010900090307 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sean Cavanaugh wrote: > ---------------------------------------- > >> Date: Fri, 6 Jun 2008 15:48:46 -0500 >> To: freebsd-questions@freebsd.org >> From: jbiquez@icsmx.com >> Subject: Re: vmware timekeeping >> >> At 03:23 p.m. 06/06/2008, you wrote: >> >>> I'm running FreeBSD 6.3-release as a guest on VMware ESX 3.0.2. My >>> problem is that the clock keeps *gaining* time. I have the >>> "timesync" option turned on in ESX's .vmx file, and I have >>> "hint.apic.0.disabled=1" in my FreeBSD guest's /boot/loader.conf. >>> >>> I used to have "kern.hz=100" in loader.conf, but that caused the >>> guest to gain time even faster. >>> >>> Does anyone have a good recipe for decent timekeeping in this config? >>> >>> Thanks. >>> _______________________________________________ >>> freebsd-questions@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >>> >> Hello all. >> >> Here is something similar. Running 6.2 stable... but the clock lose >> around 6 hours each day >> >> JB >> >> > > > The only good way of keeping time pretty set is to set up an NTP sync on the image to go off at decently constant rate (once every 3 hours or so). the vmware-tools will not synchronize the system clock. > The tools do attempt to improve timekeeping if you put tools.syncTime = "TRUE" in the guest's .vmx file. However, the tools will only move the time forward. It is attempting to compensate for "lost ticks". Without using syncTime the guest's clock can run slow, depending on the host's overall load. With syncTime on, my Linux guest machines stay synchronized perfectly. Well, they're within one second anyway, which is fine for my application. The recipe for this success was to turn on syncTime, and use the following linux boot options: clock=pit nosmp noapic nolapic However, I have not been able to achieve the same success with FreeBSD. The clock doesn't lose time, but it gains time, very slowly. It's probably load dependent, but it's around 10 seconds a day. What's the FreeBSD equivalent of "clock=pit" ? Meaning to use the PIT and not the APIC. In general, but also in this application in particular, one does not one time to move backwards. The Dovcot IMAP server immediately exits if it detects that time went backwards. In order to use NTP, you'd probably have to turn off syncTime, which probably does a better job anyway except for the gaining time problem. I haven't tried actually running ntpd instead of a periodic sync, as this is not recommended by VMware's timekeeping white paper: http://www.vmware.com/pdf/vmware_timekeeping.pdf. My last-ditch strategy will be to start monkeying with the knobs for syncTime, like these: timeTracker.catchupPercentage timeTracker.catchupIfBehindByUsec timeTracker.giveupIfBehindByUsec But I'd rather fix it the same way I have with Linux. > I heard of someone trying to change the clock in BSD to only use the hardware clock as VMWare can reset that but never heard anything beyond that. > > -Sean_______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > --------------090805020304010900090307--