Clock Cluster Algorithm

Last update: 05-Oct-2010 21:29 UTC


The clock cluster algorithm processes the truechimers produced by the clock select algorithm to produce the survivors used by the mitigation algorithms to discipline the system clock. It operates in a series of rounds, where at each round the truechimer furthest from the offset centroid is pruned from the population. The rounds are continued until a specified termination condition results. This page discusses the algorithm in detail.

First, the truechimer candidates are saved on a list of n entries sorted by root distance. For the ith entry on the list, a statistic called the select jitter is calculated as follows. Let

di(j) = q(j) - q(i),

where q(i) is the peer offset of the ith entry and q(j) is the peer offset of the jth entry, both produced by the clock filter algorithm. Then, the select jitter jS(i) of the ith entry is the root distance of the ith entry times the RMS sum of di(j) as j ranges from 1 to n. For the purpose of notation in the example to follow, let jR(i) be the peer jitter computed by the clock filter algorithm for the ith entry. In general, the expected error statistic for the ith entry is the RMS sum of these two components, but that is not needed by the clock cluster algorithm.

The object at each round is to prune the entry with the largest select jitter until the termination condition is met. Note that the select jitter must be recomputed at each round, but the peer jitter does not change. At each round the remaining entries on the list represent the survivors of that round. While the number of entries on the list is not limited, the list is always pruned to the maxclock threshold. It has default 10, but can be set by the maxclock option of the tos command. This threshold is useful to limit the number of survivors when automatic server discovery schemes are in use.

The termination condition has two parts. First, if the number of candidates is not greater than the minclock threshold set by the minclock option of the tos command, the pruning process terminates. The minclock default is 3, but can be changed to fit special conditions, as described on the Mitigation Rules and the prefer Keyword page.

gif

Figure 1. Cluster Algorithm

The second termination condition is more intricate. Figure 1 shows a round where a candidate of (a) is pruned to yield the candidates of (b). Let jmax be the maximum select jitter and jmin be the minimum peer jitter over all entries on the list. In (a), candidate 1 has the highest select jitter, so jmax = jS(1). Candidate 4 has the lowest peer jitter, so jmin = jR(4). Since jmax > jmin, select jitter dominates total jitter, so the algorithm prunes candidate 1. In (b), jmax = jS(3) and jmin = jR(4). Since jmax < jmin, pruning additional candidates will not significantly reduce total jitter. So, the algorithm terminates with candidates 2, 3 and 4 as survivors.