[ntp:questions] Re: Dopey selection of server

David L. Mills mills at udel.edu
Sat Jan 31 19:51:56 UTC 2004


You drive a car, right? You're on a busy interstate going 70 mph behind
an 18-wheeler a few car lengths ahead of you. Suddenly, he spots a radar
and slows to 55. You need to stomp on the brakes, but your speedometer
works only once every 17 minutes. Get the idea? Check the loopstats and
look for frequency wiggles. See the frequeny stability displayed in the
rv billboard; it should be well below 1 PPM on the quiet interstate. It
can take several hours to recover from a temperature or frequency warp
or a crazy truck driver.

I understand you want to use the stratum-2 servers normally with backup
a specific stratum-1 server only if the stratum-2 servers somehow become
unfaithful. Your billboard shows all servers have survived the selection
and clustering algorithms. Their offsets are processed by the combining
algorithm with weights depending on synchronization distance. The
distance does depend on stratum, but also roundtrip delay, dispersion
and aggregate jitter.

My point here is that the combining scheme is not an either-or choice,
but a weighted combination in which stratum is one of the components of
the weight function. You could specify "tinker floor 2" in the
configuration file and ntpd will not use the stratum-1 server even if it
is available. It might in fact even use the stratum-1 server if less
than three stratum-2 servers are available, but that behavior has not
been tested at length. The "*" means nothing except that the associated
statistical variables, including distance, are inherited to pass on to
possible dependent clients.

I could change the distance function or even make it tinkerable.
However, it is necessary that all NTP servers and clients in the
hierchical NTP subnet use the same function; otherwise, the subnet could
become unstable. If you did make the distance function prefer a higher
or equal stratum rather than a lower, the subnet would very much indeed
form a timing loop, just like a broken Bellman-Ford routing algorithm.


Christopher Burian wrote:
> Fred <junkmail at falseticker.co.uk> writes:
> > On Fri, 30 Jan 2004 10:05:43 -0500, "Christopher J. Burian"
> > <cburian at ll.mit.edu> wrote:
> >
> > > At home, I ran that windows utility that
> > >graphs ntp servers (mentioned a week ago here on the list) with 8
> > >servers stratum 1 or stratum 2, and after a day (too short?) decided on
> > >three stratum 2 servers.
> >
> > I must have missed the reference to this windows utility - can you
> > provide the link or message reference.?
> http://www.david-taylor.pwp.blueyonder.co.uk/software/net.htm
> Based upon advice, I added a fourth server, so that voting can work
> properly.  But I forgot that I can't use a stratum 1 if the others
> are stratum 2.  So I need to find a nice fourth stratum 2 public
> server.  I've read the documentation and rationale (admittedly
> skimming over some of the math), and I can find no justification
> for strictly preferring a stratum 1 over a stratum 2, rather than
> perhaps using perhaps a weighted bias, not an overwhelming bias.
> Also, I don't see any reason why users shouldn't be able to fudge
> a server's stratum to another level.  But these aren't my real
> problems.  My real problems are: this is a Windows machine, and
> I care more than I should about what time it is.
> How the following occurs is beyond me:
> This is about 8 hours after restarting the driver.  I can only assume
> that when ntpd happily runs 25 ms off from all its servers, it is
> because of Windows XP and not because of the software.  Or, could
> it be due to asymmetric delay over cable modem?
> ntpq> pe
>      remote           refid    st t when poll reach delay  offset jitter
> ========================================================================
> +cs.columbia.edu    2 u  767 1024  377  27.191 -28.007 0.225
> +filbert.cc.colu   2 u  752 1024  377  16.428 -23.531 2.738
> +cudns.cit.corne   2 u  762 1024  377  23.347 -22.800 1.811
> *nts200.cs.umb.e .GPS.          1 u  742 1024  377  33.255 -24.702 0.260
> None of these bad things happen on my Trimble- and Praecis-based
> private networks running Linux.  On my system at work, I routinely
> see offsets of 10s of microseconds.  Again, there, though, I am
> very annoyed that I apparently cannot use a stratum 2 server as
> the primary server with a stratum 1 as a fallback if the primary
> goes quiet.  Should be able to fudge the stratum 1 to stratum 2
> in clients so that they will obey my prefer tag.  Or, they should
> just obey the prefer tag!
> Regards,
> Chris

More information about the questions mailing list