[ntp:questions] High-precision synchronization between two computers

Jason Rabel jason at extremeoverclocking.com
Wed Aug 29 20:03:13 UTC 2007


> For a little project, I have two computers which need to be as best 
> synchronized as they could be. I tried to use ntp for that. I defined the 
> first one as a time server. The second one use the first one as unique 
> time server (I know that several time servers is recommended, but I don't 
> need perfect time, only perfect synchronization). When I run ntpdate on 
> the client, all work fery well. To achieve best synchronization, I run it 
> several time and it gives me precision up to 0.000001 seconds (which is 
> very very well). The problem is that I don't want to run ntpdate from a 
> cron job since I cannot have any steps (unless at run time). So I use 
> ntpd, but it seems not to work since the difference between the two clocks

> becomes bigger and bigger. 
> 
> What can be the problem? How could I solve this?

As Steve said, there could be a number of problems...

The first issue is that the PC clock is not all that accurate. So if your
server drifts a lot, the client will have to adjust to drift at the same
rate. It would probably be advisable to have the first PC run NTP with other
servers for a while so that it can create a reasonable drift value. Then you
can disconnect it from those and have it only use the local clock, then have
your client use that server. That is probably as good as you are going to
get.

If you want better synchronization then you could use a stable external 1PPS
source (i.e. ovenized crystal oscillator, rubidium oscillator , GPS, etc)
and have the output going to the serial port on both machines. This will
yield you better numbers than over ethernet.

Jason




More information about the questions mailing list