Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 servers set with the same timezone and I set them with the same time and I have them both updating their server time from the same internet time source.

But each week they seem to fall away from each other time wise, one will always end up about 30 seconds out of sync from the other.

Why does this happen and how can I prevent it?

share|improve this question
    
possible duplicate of Best way to synchronise the time on a Windows 2008 Server –  Tom O'Connor Aug 30 '12 at 15:08
add comment

1 Answer 1

up vote 3 down vote accepted

This happens because of many many reasons (most likely, different quality crystals/capacitors in rtc chips and/or different temperatures,...). 30s per week is alot, but that could be 15s per week for each server in different directions (one too slow, one too fast).

To prevent this, configure ntp to sync the time to an external timeserver. If you cannot connect outside, you can set up a ntp server on one of them and sync the other with it. Their clocks will be both wrong, but still synchronized.

share|improve this answer
    
thanks for the clarification - I guess I need to have it sync every night, I am kinda of dependent on these 2 times matching –  Slee Aug 30 '12 at 15:23
    
Slee, you wouldn't have it sync every night, it would constantly be in sync. NTP constantly compares itself to the upstream servers and makes adjustments so that time is accurate. –  Kyle Smith Aug 30 '12 at 15:54
    
@KyleSmith, you're wrong, that would kill pool.ntp.org if that were the case. It's on a schedule, to adjust look at something like pretentiousname.com/timesync/index.html. –  Alex Berry Aug 30 '12 at 16:38
1  
@Slee, are these servers virtual machines? If so they will need a piece of software that keeps time in sync with the hypervisor, and have the hypervisor sync to the NTP server. This is a very common occurence in virtual machines as it is difficult to emulate an accurate RTC, the VMs rely on clock cycles to maintain their time. –  Alex Berry Aug 30 '12 at 16:40
1  
It really depends on the hypervisor underneath it, if you can find out what it is then you should be able to find what software you need, for instance if it's VMWare you'll need to install VMWare tools. –  Alex Berry Aug 31 '12 at 7:47
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.