[ntp:questions] simple nt.conf cases for ntp-client

Marco Marongiu brontolinux at gmail.com
Thu Jan 23 13:06:27 UTC 2014

On 01/23/2014 12:52 PM, ardi wrote:
> Reading: http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO
> Two time sources cannot be split into two parties where one has a majority.
> What does this majority means?

It's in the sentence: "all values must lie within the error interval the
majority of candidates defines"

I am about to have all the real NTP gurus in this list bash me hard for
what I am about to write, but I am willing to help once more. Very
informally, and with *no* rigour whatsoever, this is a sketch of what

1) data collection: N references are queried, returning the time and an
estimation of their error;

2) first filter: among those N, C references are selected that have a
dispersion lower than a maximum
(http://en.wikipedia.org/wiki/Statistical_dispersion); those are called

3) second filter: a new value for the error that fits the majority of
these C references is calculated; the L references that don't fit in
this error interval are called "outlyers"; the S=C-L references that
remain are considered;

4) peer selection: among the references in S, the one that has the
smallest dispersion is selected, and ntpd will "follow" it until the
next evaluation of the data collected from the sources.

If you have just two references, the step 2) doesn't bring you anywhere
as it is impossible to reach a majority. It's like you're skipping step
2), and the results lose accuracy.

If you have three references it's OK, but should one fail you fall back
into the two-server case. To reliably survive to the failure of one
source, you need to have 4 references.

I hope it is clearer now, because if it's not, I can't help further :)

-- bronto

More information about the questions mailing list