Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 2010 07:54:58 +1100
From:      Peter Jeremy <peterjeremy@acm.org>
To:        Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: ntpd struggling to keep up - how to fix?
Message-ID:  <20100218205458.GA78560@server.vk2pj.dyndns.org>
In-Reply-To: <20100217200322.da66c9f8.torfinn.ingolfsen@broadpark.no>
References:  <20100211190652.6a66c618.torfinn.ingolfsen@broadpark.no> <20100211192515.GB13854@icarus.home.lan> <20100212132947.eb2af3d0.torfinn.ingolfsen@broadpark.no> <20100212131117.GA51905@icarus.home.lan> <20100212174452.2140cd72.torfinn.ingolfsen@broadpark.no> <20100217194927.e3ec60ae.torfinn.ingolfsen@broadpark.no> <20100217200322.da66c9f8.torfinn.ingolfsen@broadpark.no>

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

--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2010-Feb-17 20:03:22 +0100, Torfinn Ingolfsen <torfinn.ingolfsen@broadpa=
rk.no> wrote:
>On Wed, 17 Feb 2010 19:49:27 +0100
>Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no> wrote:
>
>> Unfortunately, it isn't enough to keep the machine in sync all the time.
>> But it is better than HPET so I'll keep it.

Did you delete /etc/ntp.drift between timecounter changes?

>This thread is interesting:
>http://lkml.indiana.edu/hypermail/linux/kernel/0903.1/01356.html
>
>Is there a way in FreeBSD to perform adjustmenst like adjtimex?

There's ntptime(8) but it doesn't have a "self-calibrate mode".

Based on the messages log you gave, and assuming the ntpd PLL is sane,
your acpi-safe clock is about 2500ppm slow (the steps reflect about
2000ppm and the ntpd PLL should be compensating for a further 500ppm)
- this is really bad, even for consumer-grade stuff.  Are you running
non-standard clock speeds or multipliers?

If there's nothing obvious, I'd follow John Hay's suggesion and
force set either your TSC or ACPI frequency in sysctl.conf (you
can't override the HPET frequency).

Take either the TSC or ACPI frequency reported by "sysctl machdep",
reduce it by 2500ppm and set that in /etc/sysctl.conf.  Assuming
a "standard" (3.58MHz) ACPI, the latter would look like:

machdep.acpi_timer_freq=3D3570596
kern.timecounter.hardware=3DACPI-safe

The stop ntpd, delete /var/db/ntp.drift and either reboot or
manually set the above sysctl's and restart ntpd.

[I think I've got the adjustment direction correct in the above, if
I've stuffed up, you need to adjust in the other direction]

--=20
Peter Jeremy

--liOOAslEiF7prFVr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkt9qSIACgkQ/opHv/APuIfINwCeKIjjiAPpk4Wgf0t3N4eGY81V
w0YAnR4765IlxPBHMURVL0KBOVMneHeP
=uB4/
-----END PGP SIGNATURE-----

--liOOAslEiF7prFVr--



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