Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2006 15:27:29 -0800
From:      Alfred Morgan <alfred.morgan@experclick.com>
Cc:        freebsd-questions@freebsd.org, Bill Moran <wmoran@collaborativefusion.com>
Subject:   Re: clock drifts after upgrade from 5.x to 6.x
Message-ID:  <442B17E1.1080109@experclick.com>
In-Reply-To: <20060322082235.c5d62721.wmoran@collaborativefusion.com>
References:  <44204E79.4090408@experclick.com>	<7c61221qt0meet1dudmids5vgcisejjjth@4ax.com> <20060322082235.c5d62721.wmoran@collaborativefusion.com>

next in thread | previous in thread | raw e-mail | index | archive | help

   Bill Moran wrote:

On Wed, 22 Mar 2006 00:46:57 +0000
John Murphy [1]<sub02@freeode.co.uk> wrote:



Alfred Morgan [2]<alfred.morgan@experclick.com> wrote:



  I have upgraded 4 different machines from various FreeBSD versions of
  5 to various versions of 6 and 3 of the machines has a problem where
  the clock will drift very quickly slowing about 2 seconds per minute.


   Interesting.  Were all the upgrades from versions less than 5.3
   I wonder? Reason I ask is that many people (including me) seem to
   have started having problems with ntp around that time.  There was
   a thread in the stable mailing list about it here:
   [3]http://docs.freebsd.org/cgi/mid.cgi?20050401104508.GJ71384


Most machines these days have a number of clocks available.  ACPI
is likely choosing a less accurate clock than you would like.
Apparently, with ACPI disabled, the default clock is pretty
accurate.  The worst examples of this are when you get calcru()
errors because the clock actually appears to tick backwards
sometimes.

You can manually tell FreeBSD which clock to use via sysctl.  I
don't remember the magic incanation, but a few google searches
should set you on the right path.  Search for timecounter and calcru
in addition to other terms relevent to your issue.



   No the other way around:
   ACPI enabled = clock works fine.
   ACPI disabled = clock drifts too fast for ntpd (/var/db/ntp.drift file
   is maxed out at 500.000)

   ok, Thank you Bill, I found the difference:
   working machine shows kern.timecounter.hardware: ACPI-fast
   drifting machine show kern.timecounter.hardware: TSC
   I will now try my other clock by setting this in my /etc/sysctl.conf:
   kern.timecounter.hardware=i8254
   -alfred

References

   1. mailto:sub02@freeode.co.uk
   2. mailto:alfred.morgan@experclick.com
   3. http://docs.freebsd.org/cgi/mid.cgi?20050401104508.GJ71384



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?442B17E1.1080109>