Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2010 23:12:23 +0100
From:      Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no>
To:        freebsd-stable@freebsd.org
Subject:   Re: ntpd struggling to keep up - how to fix?
Message-ID:  <20100218231223.ec6b9fa8.torfinn.ingolfsen@broadpark.no>
In-Reply-To: <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> <20100218205458.GA78560@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Feb 2010 07:54:58 +1100
Peter Jeremy <peterjeremy@acm.org> wrote:

> On 2010-Feb-17 20:03:22 +0100, Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no> wrote:
> Did you delete /etc/ntp.drift between timecounter changes?

I sure did, I used the instructions given.

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

Ok, good to know.

> 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?

No, everything at default values here (ie. I haven't changed anything in either BIOS or FreeBSD),
except from changing timer from HPET to ACPI-safe.

> 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=3570596

This one is 
root@kg-f2# sysctl machdep.acpi_timer_freq
machdep.acpi_timer_freq: 3579545

So I should change that to 3577045, right?
Like so:
root@kg-f2# sysctl machdep.acpi_timer_freq=3579545
machdep.acpi_timer_freq: 3579545 -> 3579545

and I put it into /etc/sysctl.conf as well (in case the machine reboots again).

> kern.timecounter.hardware=ACPI-safe

Yes, this is already in /etc/sysctl.conf


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

Done. We'll see if it works or not.

> [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]

Ok.

Thanks to all for helping out.
-- 
Torfinn




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100218231223.ec6b9fa8.torfinn.ingolfsen>