Last update: 17-Oct-2011 16:11 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 sorted by increasing root distance l(i) (i = 1, ..., n), where n is the number of entries. Recall that the root distance is equal to the root dispersion plus half the root delay. 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 mean square (RMS) of the di(j) as j ranges from 1 to n. The metric used by the cluster algorithm is the value l(i) jS(i) for the ith entry. At each round the entry with maximum metric is discarded and the number of entries n reduced by one. 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.
The object at each round is to prune the entry with the largest metric 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. If the candidate to be pruned is preempt able and the number of candidates is greater than the maxclock threshold, the association is demobilized. This is useful in the schemes described on the Automatic Server Discovery Schemes page. The maxclock threshold default is 10, but it can be changed using the maxclock option of the tos command. Further pruning is subject to the following termination conditions, but no associations will be automatically demobilized.
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.
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 peer 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 select jitter. So, the algorithm terminates with candidates 2, 3 and 4 as survivors.