[ntp:questions] Best solution for millisecond accuracy

Richard B. gilbert rgilbert88 at comcast.net
Fri Mar 23 19:54:17 UTC 2007

edouard funke wrote:
> Hi,
> I am running several (less than 30) servers on LAN with these restrictions :
> - no Internet
> - Windows XP/2003
> - no GPS possible
> - I need less than a millisecond accuracy.

That wording is a little ambiguous.  I'll assume that you mean the error 
must be less than 1 millisecond.

> 5 of them are on the same switch and two in an other building. Latency
> between buildings is less than 20ms. There _might_ be an internal NTP
> server synchronised to a server on internet but let say i dont have to
> count on it.
> If :
> - i choose one "good" server as my time reference (local clock) and
> synchronised all the other clients to it
> - i put all servers in peer mode
> - i put a pci card that uses a TCXO to replace the hardware clock (any
> known vendors ? i dont care about GPS sync)

Symmetricomm and Meinberg both offer such products.  The GPS is optional 
with Symmetricomm (BC637PCI is PCI card with built-in GPS and BC635PCI 
is without GPS).  I believe an OCXO is optional with one or both of the 
Symmetricomm products.  I was quoted a little less that $1100 US for the 
Meinberg product.   I think Symmetriccom is more expensive.  (They make 
good stuff but charge top dollar for it!)

> - limit maxpoll (what is the impact ?)
The correct polling interval for the circumstances will be selected by 
ntpd.  Don't change the defaults unless you understand the NTP algorithms!

> - change OS (again what is the impact ?)
Some operating systems keep time a little better than others.  Windows 
and Linux have both been known to lose clock interrupts during periods 
of high disk usage.  I've had good results with Solaris (8, 9, & 10) but 
others here seem to have had results differing from mine!

> is the accuracy of a millisecond "achievable" in those conditions ? If
> not, what can i do to achieve it ?

No!  There is no way that I know of that you can set a clock to within 
one millisecond unless you have an NTP server that has the time correct 
to within less than a millisecond.  Plus or minus one second is about 
the best you can hope for if you set the time by hand.

Without a UTC reference (hardware reference clock or at least one (four 
or more are best practice) internet server) your clocks WILL drift. 
They may drift badly.  Synchronization between systems may be fairly 
loose (many milliseconds difference between different machines).

The 20 millisecond network delay between buildings seems excessive and 
may cause problems.  The maximum error in transmitting time from server 
to client is one half of the round trip delay.  The actual error may be, 
and usually is, far less than one half the delay but there is no guarantee.

GPS is the least expensive sort of hardware reference clock.  A Garmin
GPS18LVC may be purchased for around $85 US.  You will need to provide a 
5VDC power supply and a connector (DB25 or DB9 as appropriate) to 
connect it to a serial port.  Some soldering is required. You will also 
need to be able to site an antenna with an unobstructed view of the sky.

More information about the questions mailing list