Unix Tip: What is NTP?

By Sandra Henry-Stocker, ITworld.com |  Operating Systems Add a new comment

Send in your Unix questions today!


See additional Unix tips and tricks


For some of us, the word "synchronize" brings up memories of the characters
on Mission Impossible synchronizing their watches so that they can complete
a seemingly impossible mission with split-second accuracy. While time
synchronization on computer systems seems far less dramatic, it is no less
critical. Time differences between systems running a complex application can
lead to some very troublesome problems -- such as when these time differences
make transactions appear to have happened out of order. To avoid this kind
of problem, a number of solutions for keeping system clocks in synch, have
been devised. NTP is the larges scale and most effective of these.

NTP, however, isn't just about synchronizing systems with each other. NTP is
about setting system clocks accurately. When derived from the most accurate
clocks in the world, after all, the time on systems on a network -- all
getting time ticks from an accurate time keeper -- will be both accurate and
synchronized.

Time Accuracy

Before we delve into the network time protocol, let's consider what it means
for a clock to be accurate and just how accurate a clock can be.

The most accurate time measurement devices available today are atomic clocks.
More reliable than the movement of the stars, these clocks rely on the
oscillation of the nucleus and electrons of an atom to measure a unit of time.

To get a picture of what time accuracy means, let's consider a simple analogy.
When I was a kid, I was told that the way to measure seconds was to preceed
each number with the word "Mississippi". So, I would count "Mississippi-1,
Mississippi-2, Mississippi-3" and so on. Just counting "one, two, three" and
so on wouldn't be accurate, my teachers told me, because I would say these
words too quickly making each of my seconds far too short. Mississippi worked
quite well for me. In fact, I sometimes still count seconds in this way. If
I count to 20 using the Mississippi Method, I am probably not off more than
5-10%. So, at the end of my alleged twenty seconds, maybe only 18 or as many
as 22 seconds have actually passed. That's fine for hide and seek, but it
probably doesn't cut it when we're timing synapses in the brain to analyze
some nervous system dysfunction or tracing the sequence of operations in a
security attack on our network.

What we need to measure a unit of time with great accuracy is a some mechanism
for measuring each second so closely that, at the end of a week, month or year
we still wouldn't be off by more than a couple seconds. One way to do this is
by finding something that occurs in time with extremely reliable precision.
The time it takes me to drive to work? Not even close. The time it takes a
golf ball to drop from the top of the Empire State Building to the street
below? Better, but dangerous. The time that it takes an atom to complete an
oscillation? Ah, we're getting there!

The particular frequency of the oscillations in an atomic clock is determined
by the mass of the nucleus and the gravity or "electronic spring" between the
nucleus and the electron cloud around it. These oscillations are reminiscent
of the pendulum of a grandfather clock, but they happen at an alarming
frequency -- more than 9 billion times per second.

While atomic clocks can use cesium, hydrogen or rubidium atoms, the cesium
clocks are the most accurate. Some of these clocks are accurate to five parts
in ten to the 15th power. That's five parts in 10,000,000,000,000,000. That
isn't perfect, of course. But if we lose one second in 6 million years, not
many people are going to notice.

Synchronizing Networks

NTP, which stands for "network time protocol", synchronizes the clocks on
systems and routers all over the world. The National Institute of Standards
and Technology (NIST) estimates that there are between 10 and 20 million NTP
servers and clients in the world.

Synchronized to an NTP server, systems on a network are as close in time as
their connection to their source of accurate time information allows. On a
wide area network (WAN), systems may be tens of milliseconds off. On a local
area network, the difference may be much smaller than a millisecond.

Atomic Clocks and NTP Servers

    Add a comment

    Post a comment using one of these accounts
    Or join now
    At least 6 characters

    Note: Comment will appear soon after you have activated your account.
    Obscene/spam comments will be removed and accounts suspended.
    The information you submit is subject to our Privacy Policy and Terms of Service.

    ITworld LIVE

    Operating SystemsWhite Papers & Webcasts

    White Paper

    Microsoft Enterprise Agreement Program Overview

    Discover how flexible the Microsoft Enterprise Agreement Program is to help you build the right software solution agreement for your business. This paper highlights all the available options-from on-premise software and cloud service solutions, to payment options and enrollment programs, and more.

    White Paper

    Watson - A System Designed for Answers. The future of workload optimized systems design

    Watson is a workload optimized system designed for complex analytics, made possible by integrating massively parallel POWER7 processors and DeepQA technology. Read the white paper about Watson's workload optimized system design.

    See more White Papers | Webcasts

    Ask a question

    Ask a Question