[ntp:questions] NTP architecture with virtual machines for stratum-2 ?

unruh unruh at invalid.ca
Mon Mar 4 22:31:13 UTC 2013


On 2013-03-04, janfrode at tanso.net <janfrode at tanso.net> wrote:
> kl. 21:20:46 UTC+1 mandag 4. mars 2013 skrev unruh f?lgende:
>
>
>> 
>> Virtualisation and time keeping should be kept as far apart as possible.
>> 
>> Time keeping should be done by the base OS, not by one of the virtual
>> 
>> ones. Otherwise you will get fights and bad times.
>
>
> Yes, I know this is common wisdom, but is it still correct ? With linux/KVM we have a paravirtualized clock. Original documentation: https://lkml.org/lkml/2010/4/15/355 and current timekeeping.txt:  http://lxr.linux.no/#linux+v3.8/Documentation/virtual/kvm/timekeeping.txt
>
> Also, won't an ntpd without a LOCAL clock quickly stop serving time if it's out of sync with it's remote time sources?

No. It will bring itself into alignment with the remote time sources by
stepping the time, unless it is out by more than 1000 sec or so, in
which case it will quit.

You should never use the local clock. It is only useful if all of the
servers die ( so the system has no time source to sync with) and it MUST
continue serving time, no matter how crazy or far off it is, to some
other computers. 

>     
>
>
>> 
>> 
>> >
>> 
>> > Should our stratum-2 servers all be connected to ntp1-4, or is it better to have server1-ntp1, server2-ntp2, etc.. to make sure they don't all run off the same clock source? i.e. should we for server1 have ntp.conf with:
>> 
>> 
>> If source a gives good time, why should you worry about many machines
>> using it? 
>
> I don't know, that's why I'm asking :-)
> We have had problems with our current stratum-1 device -- I just imagined it might be better in failure situations if all our clients are pointed at stratum2 servers with different reference clocks, than all hanging on the same buggy reference clock .. ?

IF the reference clock is  buggy, then of course using other sources is
better. But you have 4 stratum 1 servers. Can you imagine a situation in
which all are "buggy"? If there is nuclear war, probably your
timekeeping will be th least of your worries. Similarly if all the
electrical system goes off line because of hackers or a solar storm. 

So, having more than one server is a good idea ( and 4 is a good number)
But the only reason for using the stratum 2 is as an extreme fallback in
case all the people setting up the stratum 1 servers were incompetent,
or because of overloading of the servers. I do not think you should have
a problem with overloading ( modern neworks should be able to handle
1000 ntp packets ever few hours) but you would have to be the one to
study that. For example, if one of your links is a 300bps modem line,
then even a few ntpd would be problematic. 

>
>> 
>> 
>> And what error budget do you have for the clocks. Do they all have to
>> have nanosecond accuracy, or one second accuracy?
>> 
>
> No nano second accuracy needed. One second accuracy is probably enough.

Then almost anything you do should suffice. Use stratum 2 or even higher
stratum sources. 

millisecond is easy, microsecond easily doable ( but it takes effort),
nanosecond is very hard and expensive. 
>
>
>



More information about the questions mailing list