Configuring the Network Time Protocol (NTP)

Testing and tuning NTP

The server can be tuned using the precision statement. A fragment that would simply reset the precision to its default value follows:

   precision   -6
The precision statement sets the value of sys.precision. The variable sys.precision is the base two logarithm of the expected precision of the system clock. The default value is -6 on all servers. The sys.precision variable is defined in RFC 1305.

The NTP protocol makes use of sys.precision in several places. For one, sys.precision is included in packets sent to peers and is used by them as a kind of quality indicator. When faced with selecting for synchronization purposes one of several servers, all of which are at the same stratum and offer about the same network path delay, clients prefer to synchronize to those claiming the smallest (most negative) value of sys.precision. The effect is particularly pronounced when all the servers are on the same LAN. Hence, if you run several stratum 1 servers, or three or four stratum 2 servers, and you would like clients to prefer one of these over the others for synchronization, you can accomplish this by decreasing the value of sys.precision on the preferred server or by increasing this value on the other servers, or by doing both.

The other tuning parameter is the antihop aperture and is derived from sys.precision and NTP.MAXSKW using the following equation:

   antihop aperture = 2 ** sys.precision + NTP.MAXSKW
This equation says that the antihop aperture is equal to 2 raised to the sys.precision power plus NTP.MAXSKW.

Making the antihop aperture larger makes it less likely that the host will ``hop'' from the server it is currently synchronizing with to a different server. Unfortunately, this also increases the probability that the host continue to synchronize with a server whose clock is no longer accurate.

Making the antihop aperture smaller allows the host to hop more freely from server to server, but this can also cause it to generate a fair bit more NTP packet traffic than necessary and to no good purpose. Given the agreement among current stratum 1 NTP servers and the performance typical of the Internet, it is recommended that the antihop aperture be kept between 0.020 and 0.030. The default value is about 0.026.

Next topic: NTP query commands
Previous topic: NTP sample scenarios

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003