From owner-freebsd-stable@FreeBSD.ORG Wed Jan 18 19:13:43 2012 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 ED4E2106566B for ; Wed, 18 Jan 2012 19:13:43 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id D3B2C8FC0A for ; Wed, 18 Jan 2012 19:13:42 +0000 (UTC) Received: from omta20.emeryville.ca.mail.comcast.net ([76.96.30.87]) by qmta02.emeryville.ca.mail.comcast.net with comcast id P6ti1i0021smiN4A270YxV; Wed, 18 Jan 2012 19:00:32 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta20.emeryville.ca.mail.comcast.net with comcast id P70X1i00R4NgCEG8g70Xwy; Wed, 18 Jan 2012 19:00:32 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q0IJ0T0v006401; Wed, 18 Jan 2012 12:00:29 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Joe Holden In-Reply-To: <4F15D643.8000907@rewt.org.uk> References: <4F15D643.8000907@rewt.org.uk> Content-Type: text/plain Date: Wed, 18 Jan 2012 12:00:29 -0700 Message-Id: <1326913229.1669.281.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.26.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: FreeBSD Stable Mailing List Subject: Re: Timekeeping in stable/9 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: Wed, 18 Jan 2012 19:13:44 -0000 On Tue, 2012-01-17 at 20:12 +0000, Joe Holden wrote: > Hi guys, > > Has anyone else noticed the tendency for 9.0-R to be unable to > accurately keep time? I've got a couple of machines that have been > upgraded from 8.2 that are struggling, in particular a Virtual box guest > that was fine on 8.2, but now that's its been upgraded to 9.0 counts at > anything from 2 to 20 seconds per 5 second sample, the result is similar > with HPET, ACPI-fast and TSC. > > I also have physical boxes which new seem to drift quite substantially, > ntpd cannot keep up and as these boxes need to be able to report the > time relatively accurately, it is causing problems with log times and > such... > > Any suggestions most welcome! > > Thanks, > J I finally got a 9.0 generic build done today and I've been watching the timekeeping on 3 systems and they're all doing just fine. Two of the systems are performing pretty much identically to how they did on 8.2; the clock frequency correction calculated by ntpd differs by less than 1ppm. On the other system the kernel timekeeping routines are now choosing to use a different clock so I don't get a direct comparison of the old vs new drift rate, but the drift is still reasonable (100ppm now, used to be around 88, on an old 300mhz MediaGx-based system). I haven't had time yet to learn about the new eventtimer stuff in 9.0, but I know you can get some info on the choices it made via sysctl kern.eventtimer. Before 9.0 I'd check sysctl kern.clockrate and vmstat -i and make sure the chosen clock is interrupting at the right rate, but now with the eventtimer stuff there's not an obvious correlation between hz and profhz and stathz and any particular device's interrupt rate, at least for some clock choices (on the old MediaGx system without ACPI or HPET it seems to work more like it used to). -- Ian