[ntp:hackers] Weird initial frequency calculations.
Brian Utterback
brian.utterback at sun.com
Thu Jul 31 16:33:50 UTC 2008
While further investigating the initial frequency calculations, I got
some weird results.
What I did was take a system that had a known drift of approximately
-28 ppm. I then made a script that ran the p120 ntpd, after first
setting the system frequency and offset to 0 using ntptime. I then
traced the calls to ntp_adjtime, looking for the call that set the
kernel frequency after the initial frequency calculation. I used the
same four servers each time, all reporting time to within less than a
millisecond or so of each other. I did not configure iburst.
What I found was that ntpd set the frequency in 3 to 7 minutes, or 18
to 26 minutes. The frequency set in the 3 to 7 minute cases were
terrible approximations while those in the 18 to 26 mintue range were
pretty good, or at least in the ballpark.
So, I don't why there is a difference, but something weird is going on
in how ntpd is doing this initial frequency calculation.
Here are the data I have collected. The first column is the time since
ntpd started up, and the second column is the frequency the kernel was
being set to:
03:23 freq=615
03:28 freq=-751
03:31 freq=-8245
03:32 freq=-4135
03:37 freq=-3478
03:40 freq=-6324
03:41 freq=-5407
03:42 freq=-3551
03:43 freq=-4969
03:43 freq=2062
03:45 freq=-7290
03:47 freq=-4073
03:48 freq=-3894
03:49 freq=-6067
03:52 freq=-3325
03:53 freq=-1238
03:56 freq=-1556
03:56 freq=-2672
03:59 freq=-838
04:00 freq=-2594
04:49 freq=-6159
04:53 freq=-2309
05:36 freq=1578
05:44 freq=-7642
05:45 freq=1642
07:06 freq=-4963
18:42 freq=-22073
18:45 freq=-26337
18:48 freq=-24193
19:11 freq=-22233
19:46 freq=-25569
19:52 freq=-23362
20:15 freq=-26172
20:52 freq=-22816
21:02 freq=-26722
21:23 freq=-19315
23:17 freq=-27761
26:34 freq=-27200
--
blu
There are two rules in life:
Rule 1- Don't tell people everything you know
----------------------------------------------------------------------
Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom
More information about the hackers
mailing list