Date: Mon, 2 Oct 2006 11:22:06 -0700 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: freebsd-stable@freebsd.org Subject: RELENG_6 ntpd problems (PLL vs. FLL in SMP mode) Message-ID: <20061002182206.GA925@icarus.home.lan>
next in thread | raw e-mail | index | archive | help
The issue I'm about to bring up has been discussed back in 2005, but from what I've read, no solution was ever found: http://lists.freebsd.org/pipermail/freebsd-stable/2005-April/013399.html On multi-CPU boxes with SMP enabled in the kernel, ntpd continually flips between PLL and FLL mode. Now, this can be normal from what I've read... except ntpd isn't bothering to sync the clock until a reboot. Sep 26 15:19:39 icarus ntpd[618]: ntpd 4.2.0-a Fri Sep 22 15:40:03 PDT 2006 (1) Sep 26 15:19:39 icarus ntpd[618]: no IPv6 interfaces found Sep 26 15:19:47 icarus ntpd[618]: time reset +0.978246 s Sep 26 15:19:47 icarus ntpd[618]: kernel time sync disabled 2041 Sep 26 15:21:01 icarus ntpd[618]: kernel time sync enabled 2001 Sep 26 21:42:28 icarus ntpd[618]: kernel time sync enabled 6001 Sep 26 22:16:35 icarus ntpd[618]: kernel time sync enabled 2001 Sep 27 00:16:10 icarus ntpd[618]: kernel time sync enabled 6001 Sep 27 00:33:13 icarus ntpd[618]: kernel time sync enabled 2001 {lather rinse repeat quite a few many times at random intervals} Oct 2 02:21:16 icarus ntpd[618]: kernel time sync enabled 6001 Oct 2 02:38:20 icarus ntpd[618]: kernel time sync enabled 2001 Oct 2 08:36:42 icarus ntpd[618]: kernel time sync enabled 6001 Oct 2 08:53:46 icarus ntpd[618]: kernel time sync enabled 2001 Oct 2 11:00:37 icarus ntpd[616]: ntpd 4.2.0-a Mon Oct 2 09:14:48 PDT 2006 (1) Oct 2 11:00:37 icarus ntpd[616]: no IPv6 interfaces found Oct 2 11:01:09 icarus ntpd[616]: time reset +18.774392 s Oct 2 11:01:09 icarus ntpd[616]: kernel time sync disabled 2041 Oct 2 11:02:27 icarus ntpd[616]: kernel time sync enabled 2001 As can be seen here, over a course of 6 days, the clock skewed nearly 19 seconds. Someone please correct me if I'm wrong (I am in no way an NTP expert), but normally clock adjustments are logged via syslog as "time reset" entries, yes? I do not get any "synchronisation lost" messages either, so ntpd is able to speak to the upstream stratum server OK. $ grep "time reset" /var/log/messages Sep 26 15:08:58 icarus ntpd[619]: time reset +0.887500 s Sep 26 15:11:25 icarus ntpd[619]: time reset +0.881559 s Sep 26 15:19:47 icarus ntpd[618]: time reset +0.978246 s Oct 2 11:01:09 icarus ntpd[616]: time reset +18.774392 s I've tried setting the local system clock (RTC) to UTC, which made no difference (it was PDT (GMT-0700) prior). It's presently set to UTC. This problem *does not* happen with a UP (non-SMP) kernel. I have not tried disabling ACPI. Applicable sysctls: kern.timecounter.stepwarnings: 0 kern.timecounter.nbinuptime: 477443 kern.timecounter.nnanouptime: 0 kern.timecounter.nmicrouptime: 1033 kern.timecounter.nbintime: 40910 kern.timecounter.nnanotime: 4408 kern.timecounter.nmicrotime: 35827 kern.timecounter.ngetbinuptime: 1432 kern.timecounter.ngetnanouptime: 1170 kern.timecounter.ngetmicrouptime: 103790 kern.timecounter.ngetbintime: 0 kern.timecounter.ngetnanotime: 0 kern.timecounter.ngetmicrotime: 131615 kern.timecounter.nsetclock: 3 kern.timecounter.hardware: ACPI-fast kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000) kern.timecounter.tick: 1 kern.timecounter.smp_tsc: 0 rc.conf stuff: ntpd_enable="yes" ntpd_flags="${ntpd_flags} -g -N" Process runs as: /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -g -N ntp.conf: # clock.isc.org # clepsydra.dec.com server 204.152.184.72 iburst server 204.123.2.5 # Default: ignore all ntp queries from ALL other hosts restrict default ignore # Allow queries to/from the NTP hosts listed in "server" lines restrict 216.218.192.202 mask 255.255.255.255 restrict 216.218.254.202 mask 255.255.255.255 restrict 204.152.184.72 mask 255.255.255.255 restrict 204.123.2.5 mask 255.255.255.255 # Allow queries to/from localhost, used for ntpdc and other utils restrict 127.0.0.0 mask 255.0.0.0 # Allow queries to/from the local private network restrict 192.168.1.0 mask 255.255.255.0 nomodify -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061002182206.GA925>