How NTP Manages Network Resources (Computer Network Time Synchronization)

Think of the global NTP subnet as a vast collection of coupled oscillators, some nudging others faster or slower to huddle around UTC. Whatever algorithm is used to wrangle the oscillator herd, it must be stable, not given to ugly stampedes and endure milling about as oscillators join and leave the herd or lurch in response to a thermal insult. NTP acts to exchange time offsets between oscillators, which by nature involves averaging multiple samples. However, the most important things NTP needs to know are the averaging time constant and the sample interval, which in NTP is called the poll interval.

For every averaging time constant, there is an associated poll interval resulting in a critically damped response characteristic. This characteristic generally produces the fastest response consistent with the best accuracy. If the poll interval is much larger than the critically damped value, the oscillators may exhibit various degrees of instability, including overshoot and even something like congestive collapse. This is called undersampling, and the algorithms described in this topic try hard to avoid it. If the poll interval is smaller than the critically damped value, stability is preserved, even if unnecessary network loads result.

The best time constant is usually the Allan intercept, which is about 2,000 s, but can swing over a wide range depending on network jitter and oscillator wander. When the NTP daemon starts up, the time constant is relatively small to rapidly converge the clock frequency. Under typical conditions when the system jitter has settled within a millisecond or two and the oscillator wander to within a part per million or two, the algorithm increases the time constant and matching poll interval to reduce the load on the network and servers.


Each peer association polls the server autonomously at intervals to be determined but not beyond the span allowed by the minimum and maximum poll intervals configured for the association. For NTPv4, these default to 64 s and 1,024 s, respectively, but can be configured between 8 s and 36 h. Ephemeral associations are assigned minimum and maximum values depending on mode. Under ordinary circumstances, the association polls the server at the largest interval consistent with the current time constant but not outside the allowed span.

There are two rules required to maintain stability: The first is that the time constant is clamped from above by the maximum poll interval of the system peer and to a default minimum if no system peer is available. This ensures that the feedback loop is not undersampled. The second is that in symmetric modes the time constant in both peers cannot become unbalanced, which would lead to undersampling of one peer and oversampling of the other. The NTP packet format includes a field called the peer poll interval. Either peer sets this field equal to the poll interval in each packet it sends. The peer receiving this packet sets the association poll interval to the minimum of its own host poll interval and the packet value. While this algorithm might result in some oversampling, it will never result in undersampling.

Next post:

Previous post: