Correctness and Accuracy Expectations

One of the most important goals for the NTP design is that it conforms to strict correctness principles established by the computer science theory community. The thread running through just about all the literature on time business is that the intrinsic frequency error of the computer clock must be strictly bounded by some number. As a practical matter, this number has been set at 500 PPM, which works out to 0.5 ms/s, or 1.8 s/h, or 43 s/day. This is a large error and not found often; more often, the error is less than 100 PPM. It is not a showstopper if the actual error is greater than 500 PPM, but NTP will not be able to reduce the residual time offset to zero.

A real showstopper lies in the way NTP calculates time values using 64-bit arithmetic. This requires the computer clock to be set within 34 years of the current time.* There are two reasons for this.The 34-year limit is very real, as in early 2004 NTP tripped over the age of the Unix clock, which began life in 1970.

Correctness principles establish the frequency and time bounds representing the worst behavior of the computer clock; however, we are often more concerned with the expected behavior. For the ultimate accuracy, the discipline algorithm would have to control the hardware clock directly, and this has been done in experimental systems. Advances in computer timekeeping technology have raised the accuracy bar over the decades from 100 ms, when the Internet was teething, to a few microseconds in the adolescent Internet of today. However, the ultimate accuracy can be achieved only when the clock can be disciplined with exquisitely intimate means. In practice, this requires the discipline algorithm, normally implemented in the NTP software, to be implemented in the operating system kernel.

There have been two generations of kernel discipline algorithms: one over a decade ago designed to provide microsecond resolution and the latest to provide nanosecond resolution. The original discipline was implemented for Sun Solaris, Digital (now HP) Tru64, FreeBSD, Linux, and perhaps others. It has been included in Solaris and Tru64 releases for many years. The new discipline has been implemented for all of these systems as well but is not yet a standard feature in Solaris and Tru64. It is included in the current FreeBSD release and is an option in the current Linux release.

How accurate is NTP time on a particular architecture, operating system, and network? The answer depends on many factors.Absolute accuracy relative to UTC is difficult to determine unless a local precision reference clock is available. In point of fact, systematic errors are usually fixed and unchanging with time, so once calibrated they can be ignored. An exception is the error due to asymmetric delays, by which the transmission delay in one direction is significantly different from that in the reciprocal direction. Experience shows that these delays change from time to time as the result of network reconfigurations by Internet service providers, at least for paths spanning large parts of the Internet copper, glass, and space infrastructure. A common case is when one leg of the Internet path is via satellite and the other is via landline.

It is easier and usually more useful to interpret the jitter and wander statistics produced by NTP as accuracy metrics. Certainly, this is the most important statistic in the provision of real-time audio and video services. The short answer for accuracy expectations is probably a few milliseconds in the vast Internet prairies covering the planet with occasional mountain peaks of a few tens of milliseconds due to network congestion. With slow, congested links to East Jabip,* accuracies may be in the 100-ms range. In quiet, full-duplex 100-Mb Ethernets where collisions are forbidden and hubs are lightning quick, the performance can be much better. Typical accuracies are better than 100 ]s at a primary server degrading to a millisecond at a secondary server, but these expectations can be demolished if a rapid temperature change occurs or a server is rebooted.

The reference implementation includes software drivers for over 40 radio and satellite receivers and telephone modem services for every known means of national and international time dissemination service operating today. Where a sufficiently pristine external discipline signal such as a pulse-per-second (PPS) signal from a GPS receiver or calibrated atomic clock is used and the kernel discipline is available, the accuracy can be improved to a microsecond or better under most conditions.

Next post:

Previous post: