[time-nuts] PPS jitter - Oncore VP w/NTP

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jun 22 15:20:01 EDT 2005

In message <9A310763-F748-4BC3-83EE-E2D96257367E at jcmco.com>, Jim Miller writes:
>Thanks for the quick replies, everybody!  My comments below:
>On Jun 22, 2005, at 2:39 PM, Poul-Henning Kamp wrote:
>>>> pll offset:           1.106e-06 s
>>>> pll frequency:        80.865 ppm
>> This is not indicative of good hardware.
>OK. What sort of numbers would I look for on a good system?  An order  
>of magnitude difference from these?

>kern.timecounter.hardware: TSC

OK, in that case it is probably just the TSC calibration at boot
which isn't very good.

You may want to stick something like:
	/sbin/sysctl machdep.tsc_freq=999

Where 999 is a frequency approx 80PPM away from whatever the
sysctl reports right now.  (I can't remember which way the
sign goes in this case, so it is either N*1.00008 or N/1.00008
you are looking for.

>It is a 200Mhz Pentium dedicated to the NTP role and doing nothing  
>other than ntpd and my login shells.

Is the ATA disk using PIO mode by any chance ?  That generally
ruins the interupt latency badly.

>I will try some other motherboard/cpu combinations and compare the  
>results. Should I look at other platforms (Sun, etc) for better  
>interrupt service?

Well, the interesting parameter is worst case behaviour and that
is hard to characterize.

At the risk of sounding like a broken record: you will get better
performance out of a $200 soekris 4501 than you will of any piece
of general purpose computer hw because the Soekris can timestamp
in hardware without interrupts getting in the way:


>Do you have some ntptime or kerninfo output from a "good" piece of  
>hardware that I can use as a goal?  I'm mostly guessing at this point  
>what is good performance and what is bad but increasing error  
>counters most always seem bad. :-)

Not really, because that is the other half of the problem.

For best performance from the stock NTP code, you want to crank the
"pollrate" for the oncore down to 16 seconds ("minpoll 4 maxpoll
4", in that order, it doesn't work in the other order).

In some cases (typically if the motherboard X-tal is too close to
the power-electronics for the cpu) you may see instability in which
case you should increase it to 32 seconds.

Alternatively, but I will caution against this, you can use "the
kernel PPS discipline" stuff, but I have never gotten satisfactory
performance from that either.

I have given up using the stock NTP software for stratum 1 servers
because the PLL is simply not suited for that kind of task, in
the end I wrote my own (http://phk.freebsd.dk/NTPns) but that is
not really for beginners either.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the time-nuts mailing list