[ntp:questions] Slow convergence of NTP with GPS/PPS

Richard B. Gilbert rgilbert88 at comcast.net
Wed Oct 22 20:25:07 UTC 2008


Unruh wrote:
> "Richard B. Gilbert" <rgilbert88 at comcast.net> writes:
> 
>> Nicola Berndt wrote:
>>> Unruh schrieb:
>>>
>>>>>>   
>>>>> I see, that's too bad then.. :( I am already using minpoll 4 maxpoll 4
>>>> OK, But that should have a convergence of minutes not hours. Mind you NTPs
>>>> habit of throwing away 7 out of 8 queries of the clock does not help.
>>>> (clock filter). Especially for a pps that is pretty extreme.
>>> Today I moved the computer to a different location to work there and I 
>>> found it to set its clock right after start and keep it within ms-range! 
>>> I didn't change anything, just shut down, drove there and turned it on, 
>>> so I am really confused about that. Both locations are normal rooms with 
>>> normal room-temerature. Well, I duplicated the system (that was why I 
>>> was there..) and came back home with mine and tomorrow I will see if it 
>>> behaves different again. Very very weird! It looks as if all of a sudden 
>>> the driftfile was used and before not! This is also very strange, since 
>>> the driftfile was (re)written yesterday, so ntp knew about it yesterday. 
>>> My ntp.conf also includes the driftfile location.
>>>
>>>>> No, the Soekris will run linux an d ntpd and the oscillator will just be 
>>>>> on an external little board. The computer is residing in an airport 
>>>>> hangar for MONTH sometimes with no powersource at all! There is 
>>>> Hard for it to be on all the time then. Or for it to have anthing like an
>>>> accurate time. And that ovenized oscillator will also be pretty useless (
>>>> much worse than the GPS) since it will have no power either and the crystal
>>>> will not be oscillating nor the oven keeping the temp constant. 
>>> Oh, so I got the word ovenized wrong: I understood it to be very immune 
>>> against varying temperature. Ok, so if it needs an heater and all, it's 
>>> useless in my case.
>>>
>>>> So, what you have is a free standing computer which must come out of a cold
>>>> shutdown (ie the oscillator frequency on startup will be way off its
>>>> frequency in steady state because it is cold) so will be far from
>>>> equilibrium. What is your time error requirement? Seconds, milliseconds,
>>>> microseconds? In such a situation ntp would probably give you a few
>>>> milliseconds. But it certainly is NOT designed to give you good accuracy in
>>>> such a situation during startup.  What are you finding?
>>> Well, one thing I can of course always do is to boot hte machine, let it 
>>> run for a flittle while and reboot it, so it boots with a warmed up 
>>> oscillator. This would give trouble with the driftfile, though..
>>>
>>> We target for millisecond accuracy. As I understand, the oscillators on 
>>> standard PCs are mostly cheapest crap and there are way better 
>>> oscillators I could use to replace the original. Is that correct?
>>>
> 
>> The clock in a PC is basically the guts of a cheap "Quartz" watch.  It 
>> wouldn't surprise me if the manufacturers bought the crystals rejected 
>> by the watch makers.  I suspect that the clock exists MOSTLY so the 
>> machine will have the correct date for things like letters and checks.
> 
>> Replacing ANYTHING on the PC mother board will void your warranty.  It 
>> may also cause your PC to cease functioning!!
> 
>> If you need a real clock in your PC, you can buy a board that plugs into 
>> the PCI bus and is equipped with an OCXO (Oven Controlled Xtal (Crystal) 
>> Oscillator).  Some will take a signal from GPS satellites and fine tune 
>> the crystal.  Such boards are available from Meinberg Funkurhen and
>> Symmetricom (BC635PCI/637PCI) for a great deal of money ($1200 to $2400 
>> US) the last time I looked.  If you have lots of money and need a REALLY 
>> accurate clock, even without full time access to GPS, you might want to 
>> look at these products.
> 
> That was what he suggested. Unfortunately his computer must be switched
> off, in hostile environments (eg winter) with no power at all for sometimes
> months. Ie, the oven controlled crystal is pretty useless to bring up the
> clock with accurate frequency and offset withing 10 of seconds to minutes of switchon.. 
> I suspect an oven will take many minutes to hours to stabilize.
> A termistor on the crystal on the other hand might be useful to compensate
> the temperature ( there is an alteration of ntp which also calculates the
> temp compensation of the crystal and uses that to calculate the required
> drift rate.-- unfortunately I do not remember its name of location on the
> web)
> 
> Unfortunately with ntp itself, even if he had gps, the fact thatt the drift
> rate changes relatively rapidly on startup would still result in a offset
> and overshoot by ntp. Since you could do a minpoll=maxpoll=4 it would be
> relatively quick to settle in, but of course since ntp only uses 1/8 of the
> measurements, that would be of the order of 5 min to settle down.

Is it just my imagination or is he asking for something pretty 
unrealistic?  NTP will not do it.   Chrony might but I'm not familiar 
with it and can't say for sure.  Serious timekeeping equipment is 
generally operated 24x365 in a controlled environment.

To turn your equipment on after months of downtime and expect it to lock 
on to the correct time with millisecond accuracy within seconds is 
asking for a hell of a lot.

My best suggestion is to turn the thing on two or three days before he 
needs it!  Alternatively he could spend $50,000 US and up on an atomic 
clock of his very own. . . .




More information about the questions mailing list