From owner-freebsd-stable@FreeBSD.ORG Thu Feb 18 20:55:06 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1C31065672 for ; Thu, 18 Feb 2010 20:55:06 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id C98AA8FC13 for ; Thu, 18 Feb 2010 20:55:05 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-232-148.belrs3.nsw.optusnet.com.au [122.106.232.148]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o1IKsx52014226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 07:55:00 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o1IKsxL2078678; Fri, 19 Feb 2010 07:54:59 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o1IKswKk078677; Fri, 19 Feb 2010 07:54:58 +1100 (EST) (envelope-from peter) Date: Fri, 19 Feb 2010 07:54:58 +1100 From: Peter Jeremy To: Torfinn Ingolfsen Message-ID: <20100218205458.GA78560@server.vk2pj.dyndns.org> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20100217200322.da66c9f8.torfinn.ingolfsen@broadpark.no> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@freebsd.org Subject: Re: ntpd struggling to keep up - how to fix? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 20:55:06 -0000 --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 wrote: >On Wed, 17 Feb 2010 19:49:27 +0100 >Torfinn Ingolfsen 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--