[ntp:hackers] 8 seconds ever 15 minutes

John Hay jhay at icomtek.csir.co.za
Sat Jun 21 01:40:51 PDT 2003

Hi Tuc,

On Fri, Jun 20, 2003 at 08:56:40AM -0400, Tuc wrote:
> Hi,
> 	Hopefully I can explain the problem properly.
> 	I have a Dell Inspiron 8200 running FreeBSD 4.8-STABLE (cvsup
> as of last week). Apparently this model is KNOWN for its poor internal
> clock. 
> 	Every 15 minutes I get the message :
> Jun 20 08:39:23 himinbjorg ntpd[1778]: time reset 8.419018 s
> Jun 20 08:39:23 himinbjorg ntpd[1778]: synchronisation lost
> 	I set a drift file, but thats always "500.000" which I think is
> a default. 
> 	I've tried to play with tickadj. My standard one is :
> himinbjorg# tickadj
> KERNEL tick = 10000 usec (from _tick kernel variable)
> PRESET tick = 10000 usec
> KERNEL tickadj = 5 usec (from _tickadj kernel variable)
> PRESET tickadj = 5 usec
> KERNEL hz = 100
> calculated hz = 100.00 Hz
> recommended value of tickadj = 5 us
> 	I set tickadj to some wild number like 30012 and it didn't do anything.

tickadj is not usefull on FreeBSD. FreeBSD use what is called "timecounters".
There are various "time" sources in a PC/Laptop and it might be that FreeBSD
is not using the "best" one for your circumstances. Or maybe it just need
a little help in figuring out the proper frequency.

You can see which time source is being used by typing:

sysctl kern.timecounter.hardware

You can see which ones are available with:

sysctl machdep | grep freq

The TSC timecounter is very good on PCs that don't do power management,
but a poor choice on machine, like notebooks, that play with the CPU
frequency to tweak the power usage. There the i8254 is probably a better
choice. On 5.x you can also use acpi. You can change the timecounter to
use with the kern.timecounter.hardware sysctl and you can tweak the
frequency by tweaking the machdep.*_freq value. For instance, I have
this in the /etc/sysctl.conf file of one of my time servers:


Hope this helps. This should probably have been asked on the
comp.protocols.time.ntp newsgroup.

John Hay -- John.Hay at icomtek.csir.co.za / jhay at FreeBSD.org

More information about the hackers mailing list