[ntp:questions] using NTP to check synchronization of two servers

David Woolley david at ex.djwhome.demon.co.uk.invalid
Mon Nov 3 21:21:41 UTC 2008

Jason Dusek wrote:
>   At my work, we're using Amazon EC2 to host all services. The
>   clock is set on our 'instances' by whatever machine the
>   instance is running on -- as is usually the case with Xen.

Virtual machines systems tend to run time at a variable rate!  There is, 
somewhere a couple of months back, a link to a VMWare paper on how it 
distorts time.

>   Were all the instances definitely on the same Xen host, I
>   could be comfortable saying their clocks were synched pretty
>   closely; but at present, that is not the case and it's not
>   clear to me how close the clocks will be on instances across
>   an EC2 data center (or across data centers). Is there a way to
>   run NTP on two servers so that they can calculate their mutual
>   time difference?

"ntpdate -d" might be as good, for that application.

You will be able to set bounds on the time difference, but you won't 
know how much is true difference, and how much is the result of 
asymmetric propagation delays in the NTP packets.  On virtual machines, 
scheduling of the virtual machines may introduce significant skewing of 
propagation times.  Also, you may find you get almost zero round trip 
times when they were actually quite large, because time was not passing 
on the sending virtual machine.

If you want approximately right time on a virtual machine, you need to 
NTP synchronise the hosts and run the equivalent of VMWare tools.  You 
may find that only the virtual RTC actually has good time.
> --
> _jsn

More information about the questions mailing list