Documentation\Technical Information\Accuracy\Clock Targeting
|
This document discusses how Domain Time II handles time corrections, and what methods are used
to maintain time synchronization with the time source within a targeted range of accuracy.
First-level Reasonableness Check
Domain Time II uses a series of "reasonableness" checks to determine if the time received from a
time source is valid before accepting the time correction. A time will be accepted as valid only
if it falls within all of the following ranges:
- The Domain Time II Protocol limits - Date of product release through 31 Dec 21244
- The date limits of any other selected time protocols (i.e. NTP is valid until 31 Dec 2035). See the
Time Protocols page for more information on specific protocols.
Any times falling outside of these ranges will always be rejected as invalid.
The Initial Time Correction
Assuming the received time from the source is deemed valid by the First-Level Reasonableness Check described
above, the first clock correction after startup is always accepted without question. This is
quite important, since at the time of startup a machine's clock may be completely unsynchronized
due to CMOS clock failure or Y2K BIOS errors. (Machines configured as slaves will continue accepting
any amount of correction at all times because a slave's clock is designed to track
the master's clock as closely as possible. It is the master's responsibility to make
sure corrections fall within the appropriate bounds. Even so, a slave will not accept
an invalid time from a master.)
Subsequent Corrections
After the initial time correction, corrections are accepted only if they are within both the
valid range of the First-Level Reasonableness Check and the Correction Limits specified in
the Domain Time Server or Client's configuration. By default, corrections of less
than 250 milliseconds, or greater than 12 hours, are rejected. The lower limit prevents the
propagation of clock jitter (the normal back-and-forth
drift), while the upper limit prevents the propagation of invalid time.
Note that on Win95 or Win98 machines, a correction of fewer than 55 milliseconds (an 18th of
a second) is meaningless since Win95/Win98 truncates the time to the next-lowest 18th of
a second before setting the time. Domain Time II Client treats corrections of
fewer than 55 milliseconds as an exact match when running on Win95 or Win98.
Target Accuracy Seeking
Domain Time II may be set to check its time either every x hours and minutes, or "often enough" to reach
a target accuracy. The target accuracy is defined as the maximum variance, at any one moment,
between a Domain Time II machine and its time source. By default, target accuracy seeking is
enabled on all Domain Time II machines. The following discussion examines how Domain Time II
adjusts its operating parameters to achieve the target accuracy.
In addition to responding to cascading changes, each Domain Time II
machine tracks the accuracy of its clock by examining the amount of each periodic correction.
As the amount of correction increases, the machine checks with its server
more frequently. As the amount of correction decreases, the machine checks with
its server less frequently. In this way, Domain Time II checks however often is
"often enough" to reach its target accuracy. The interval between checks is
called the window size.
Masters and Independent Servers
- The starting window size is one hour
- The minimum window size is fifteen minutes
- The maximum window size is eight hours
- The default target accuracy is 250 milliseconds (one quarter of a second)
- Checks triggered by a synchronization event (control panel applet
button or cascade trigger) do not affect the window size.
- The clock is set on startup, then checked again every
window size minutes. The following process describes how
Domain Time II calculates an appropriate window size:
- if the amount of correction is less than the target accuracy,
and the current window size is four hours or more, the window size
is not changed; otherwise,
- if the correction is more then four times the target, the window size is halved; otherwise,
- if the correction is greater than the target, the window size decreased by fifteen minutes; otherwise,
- the window size is increased by fifteen minutes.
- The resulting window size is checked to make sure it is not less than the minimum or
greater than the maximum, and then the process repeats.
Slaves
- The starting window size is fifteen minutes
- The minimum window size is ten minutes
- The maximum window size is two hours
- The default target accuracy is 100 milliseconds (one tenth of a second)
- Checks triggered by a synchronization event (control panel applet
button or cascade trigger) do not affect the window size.
- The clock is set on startup, then checked again every
window size minutes. The following process describes how
Domain Time II calculates an appropriate window size:
- if the amount of correction is less than the target accuracy,
and the current window size is four hours or more, the window size
is not changed; otherwise,
- if the correction is more then four times target, the window size is halved; otherwise,
- if the correction is greater than the target, the window size decreased by five minutes; otherwise,
- the window size is increased by five minutes.
- The resulting window size is checked to make sure it is not less than the minimum or
greater than the maximum, and then the process repeats.
Clients
- The starting window size is four hours
- The minimum window size is one hour
- The maximum window size is eighteen hours
- The default target accuracy is 500 milliseconds (one half of a second)
- Checks triggered by a synchronization event (control panel applet
button or cascade trigger) do not affect the window size.
- The clock is set on startup, then checked again every
window size minutes. The following process describes how
Domain Time II calculates an appropriate window size:
- if the amount of correction is less than the target accuracy,
and the current window size is four hours or more, the window size
is not changed; otherwise,
- if the correction is more then four times the target, the window size is halved; otherwise,
- if the correction is greater than the target, the window size decreased by one hour; otherwise,
- the window size is increased by one hour.
- The resulting window size is checked to make sure it is not less than the minimum or
greater than the maximum, and then the process repeats.
The absolute limits for accuracy-targeted checking are a minimum of 1 minute and a
maximum of 12 hours. Machines with well-behaved clocks will typically settle down
to checking every 2-4 hours (clients) or every 30-90 minutes (slaves). Since slaves are
responsible for serving the time to multiple clients, their accuracy requirement
is much higher.
|