The base stations for next-generation LTE (Long-Term Evolution) cellular networks need to synchronize their operations within 1,100 nanoseconds. And in the financial world, high frequency trading requires precise measurements, as automated traders vie to complete orders in milliseconds.
Of course, most servers can get outside help, by synchronizing over the Internet from one of the world's official time keepers, such as the U.S. Naval Observatory or the National Institute of Standards and Technology.
Getting the correct time from the Internet also has pitfalls, though. A NIST server could spit out a message with the exact time, but there's a slight lag before that message gets back to the server sending the request. Server software can estimate how long the messages will take to get through the network, but each trip may vary depending on congestion.
By default, NTP, used by most servers for time synchronization, polls a master clock once every 64 seconds, a frequency that can only be increased to about every 15 seconds, limiting accuracy.
NTP also has difficulty maintaining accuracy in virtualized cloud environments, often for mysterious reasons. "Getting accurate time out of virtual machines is something that has plagued all of the virtual machine providers," Neville-Neil said. VMware has worked on improving the time accuracy of its virtual machines, though for many general use cloud providers, such as Amazon, exact time measurement remains a challenge.
Even when checking an outside master clock, computer software will introduce additional distortions. The operating system typically digests network packets in batches, delaying time packets. And the software for managing time may be pushed down the processing queue in favor of other jobs.
Precision Time Protocol, the IEEE standard, was developed to offer servers even greater accuracy. It's used by the financial industry, the power industry and telecommunications companies.
There is no magic that makes PTP more accurate than NTP, other than the fact that it polls a master clock more often, Neville-Neil said. PTP can check a master source every second, for those organizations willing to allocate more network bandwidth. Using multicasting, all the servers see the same time packet at the same time.
"You can always build a more accurate time system, though it generally costs an order of magnitude more money per accuracy level," Neville-Neil said.
Sign up for Computerworld eNewsletters.