[ntp:questions] Allan deviation survey

Miroslav Lichvar mlichvar at redhat.com
Tue Sep 14 13:37:58 UTC 2010


On Tue, Sep 14, 2010 at 02:16:48AM +0000, David L. Mills wrote:
> Miroslav,
> 
> I think we are talking right past each other. Both Chrony and NTP
> implement the clock discipline using a second-order feedback loop
> that can minimize error in both time and frequency, although each
> uses a different loop filter. Chrony uses a least-squares technique;
> NTP uses a traditional phase-lock loop. The response of these loops
> is characterized by risetime and overshoot, or alternatively time
> constant and damping factor. If Chrony were designed to have similar
> risetime and overshoot characteristics and equivalent time constant,
> when operated under the same conditions (trace 1) it will perform in
> a manner similar to NTP. That was and is my claim.

Ok, that wasn't clear to me from the previous message.

However, the clock discipline used in chrony is very different from
the one in ntpd. The phase and frequency are maintained and adjusted
separately, so there is no overshoot.

> I read your message very carefully and conclude you have done
> something very similar to what I have. You generated phase noise
> from an exponential distribution and verified it has slope -0.5 on a
> variance-time plot, then generated random-walt frequency noise and
> verified it has slope near zero on a variance-time plot or used some
> other equivalent technique to verify the distributions. Using trial
> and error you found appropriate factors to combine the phase and
> frequency noise to produce an Allan variance characteristic similar
> to trace 1. All this is not hard using Matlab, but you might have
> used something else.

Yes, something like that. I was adjusting phase noise with normal
distribution and random-walk frequency noise in my simulator until the
Allan deviation plot was close to the trace 1 from your plot. I think
the values were 5 us and 0.4 ppb/s.

> The interesting thing to me is how you used that information to
> develop the claim that Chrony is far better than NTP? To support
> your claim, you would have to confront both Chrony and NTP with
> samples drawn from the resulting distribution and compare
> statistics.  The cumulative probability distributions in Chapter 6
> of my book were made using the NTP simulator included in the NTP
> distribution. I assume you have something similar.

I have used the clknetsim results I announced here few months ago.
Since then the simulator was improved to support a reference clock
simulation, but I didn't make a 64s poll refclock graph yet, so I've
used the NTP results instead. From what I've seen so far results from
NTP and refclock simulations are similar unless there is a resolution
limit hit, etc. I think for our comparison it should be good enough.

Knowing the frequency noise value, I have looked at this RMS
offset-phase noise plot generated with 10ppb/s random-walk frequency
noise

http://mlichvar.fedorapeople.org/clknetsim/test1_exp.png

and divided the x and y scales by factor 25 to match the trace 1
frequency noise. Looking at it carefully again, chrony is here
actually more like 10 times better than ntpd, perhaps I missed by one
order in the graph the first time.

> It would be interesting to repeat the experiment with trace 3 and
> NTP operating at a poll interval of 16 s..

To trace 3 seems to correspond 0.4us exponential phase noise and
0.4ppb/s random-walk frequency noise. In such setting and 16s polling
interval chrony is about 15 times better than ntpd.

-- 
Miroslav Lichvar



More information about the questions mailing list