[ntp:questions] NTP vs chrony comparison (Was: oscillations in ntp clock synchronization)

Danny Mayer mayer at ntp.isc.org
Sun Jan 27 16:33:55 UTC 2008


David L. Mills wrote:
> It's easy to make your own Allan characteristic. Just let the computer 
> clock free-run for a couple of weeks and record the offset relative to a 
> known and stable standard, preferable at the smallest poll interval you 
> can. The PPS from a GPS receiver is an ideal source, but you have to 
> jerry-rig a means to capture each transition.
> 
> Compute the RMS frequency differences, decimate and repeat. Don't take 
> the following seriously, I lifted it without considering context, but 
> that's the general idea. Be very careful about missing data, etc., as 
> that creates spectral lines that mess up the plot.
> 
> p = w; r = diff(x); q = y; i = 1; d = 1;
> while (length(q) >= 10)
>      u = diff(p) / d;
>      x2(i) = sqrt(mean(u .* u) / 2);
>      u = diff(r) / d;
>      x1(i) = sqrt(mean(u .* u) / 2);
>      u = diff(q);
>      y1(i) = sqrt(mean(u .* u) / 2);
>      p = p(1:2:length(p));
>      r = r(1:2:length(r));
>      q = q(1:2:length(q));
>      m1(i) = d; i = i + 1; d = d * 2;
> end
> loglog(m1, x2 * 1e6, m1, x1 * 1e6, m1, y1 * 1e6, m1, (x1 + y1) * 1e6)
> axis([1 1e5 1e-4 100]);
> xlabel('Time Interval (s)');
> ylabel('Allan Deviation (PPM)');
> print -dtiff allan
> 
> Dave

And for those of you who didn't recognize it, that's MatLab code.

Danny



More information about the questions mailing list