[ntp:questions] questions Digest, Vol 136, Issue 6, sync cluster

Natalie Abravanel natalie.abravanel at kaminario.com
Thu Feb 18 10:46:51 UTC 2016


Hey

>*I don't understand this sentence completely.  Is having Server-1 sync only to its local clock something you did in the past and are now not doing since you are using an external NTP server/client? 

Yes in the past we used to have only Local synchronization. We have a cluster that used to be synched locally. Meaning in the cluster there used to be one NTP server which is synching to it's LOCAL, and all other servers in the cluster are syncing to it. In a local network with minor delays and offset. 

>*I don't think you will ever make NTPD tolerate a 5 minute offset between computers.  Upon reboot or start up, NTPD is setup to reset the clock to the current time and restart itself when it is more than a few second offs from the server; I don't remember the exact tolerance value, and I can't find the -x option.  Where did you see that?  The NTPD -g command line option ("allow big initial time step") controls this, and most people use it.  OW, NTPD just exits when there is a big time difference between the client and the server. 

For the -x option you can read here http://doc.ntp.org/4.2.2/ntpd.html . What I mean is that in the beginning of the sync process I would like to support 5 min tolerance between the external and server1 (above the 5 min I will not allow to start a sync process) 

>*How long server-2 takes to sync to server-1 depends on 1) whether server-1 thinks it has good time from the external server (that takes a few minutes after a reboot), and 2) how recent a version of NTPD you are using; more recent versions of NTPD converge much faster than older ones, and 3) the accuracy of the computer clock on server-1 and server-2.  You don't say what O/Ss you are running, and I can't help much with Linux.  

I am using ntpd - NTP daemon program - Ver. 4.2.4p8
CentOS release 6.4 (Final)
My origin problem is that I would like to have the ability to sync my cluster with external source. Currently we are using local synchronization. The most important thing for us is to maintain all the servers in the cluster synced with minimal offset ( as for today it is not more than 5 millisecond).
I have tried to accomplish that, by having one external NTP (it can be in maximum 5 min offset when starting to sync), one primary server inside my cluster which is trying to sync to the external, and all other servers in the cluster are synching to the primary(as in the past)

Questions:
* As I understand I have might created a chain of un stable NTP (server/clients)
It seems that if I start the synchronization with a minimal offset from the external NTP to all servers in the cluster, the chain is converging  as it should.

* When starting the synchronization process my servers in the cluster are always with minimal offset from each other (at the beginning). If I start the synchronization with offset from the external (maximum 5 min') the chain is not always converging in spite the fact that in the initial state all servers in the cluster were synced.

* I see that NTP maintain data to the ROOT such as, rootdispersion rootdelay. It makes me wonder if As long as the primary is not stable, it will cause all other servers in the cluster not to sync! 

*  Should I avoid synching with extra NTP servers that are running under virtual machines, or servers which are synching to LOCAL 

*  What is the correct way to sync a cluster to an external NTP source? In the cluster only one server has the ability to access to the "outside" (other servers are communicating only internally) otherwise I would have flatten the NTP chain, and all servers in the cluster will sync to the same external NTP source.

10x, Natalie, appreciates any help



-----Original Message-----
From: questions [mailto:questions-bounces+natalie.abravanel=kaminario.com at lists.ntp.org] On Behalf Of questions-request at lists.ntp.org
Sent: Saturday, February 13, 2016 2:00 PM
To: questions at lists.ntp.org
Subject: questions Digest, Vol 136, Issue 6

Send questions mailing list submissions to
	questions at lists.ntp.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.ntp.org/listinfo/questions
or, via email, send a message with subject or body 'help' to
	questions-request at lists.ntp.org

You can reach the person managing the list at
	questions-owner at lists.ntp.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of questions digest..."


Today's Topics:

   1. Re: NTP refuse to sync (Charles Elliott)


----------------------------------------------------------------------

Message: 1
Date: Fri, 12 Feb 2016 09:20:41 -0500
From: "Charles Elliott" <elliott.ch at comcast.net>
To: "'Natalie Abravanel'" <natalie.abravanel at kaminario.com>,
	<questions at lists.ntp.org>
Subject: Re: [ntp:questions] NTP refuse to sync
Message-ID: <002101d165a0$8fa716c0$aef54440$@ch at comcast.net>
Content-Type: text/plain;	charset="us-ascii"

>*         Inner NTP Server- 1 was used to be synced only to its Local, that
way inner 2 and inner 1 had a > minor offset. I must maintain this behavior.

I don't understand this sentence completely.  Is having Server-1 sync only to its local clock something you did in the past and are now not doing since you are using an external NTP server/client?

>*         Once adding the external sync- we would like to support 5 min
offset as maximum (running ntpd >in slew mode -x under inner 1), Inner NTP server-1, accept the external NTP as a valid source >synchronization, and starts a synchronization process with the external ntp. While NTP server-1 is >synching (offset is getting down in a rate of not more then 0.5 MS per second), Server NTP 2 refuse to >sync for a while, getting to gain offset from inner NTP-server1 - which I must avoid. (after 13 hours >running we get low offsets(I have all outputs...))

I don't think you will ever make NTPD tolerate a 5 minute offset between computers.  Upon reboot or start up, NTPD is setup to reset the clock to the current time and restart itself when it is more than a few second offs from the server; I don't remember the exact tolerance value, and I can't find the -x option.  Where did you see that?  The NTPD -g command line option ("allow big initial time step") controls this, and most people use it.  OW, NTPD just exits when there is a big time difference between the client and the server. 

How long server-2 takes to sync to server-1 depends on 1) whether server-1 thinks it has good time from the external server (that takes a few minutes after a reboot), and 2) how recent a version of NTPD you are using; more recent versions of NTPD converge much faster than older ones, and 3) the accuracy of the computer clock on server-1 and server-2.  You don't say what O/Ss you are running, and I can't help much with Linux.  Windows 8, 8.1 has a clock precise to 100 nanoseconds; the Windows 7 clock is all over the map, and you never will be able to sync a Windows 7 machine to less than several hundred microseconds.  The recency of the CPU and motherboard also matter.
More recent CPUs have a timestamp counter (TSC) that does not vary with the CPU frequency, while older ones don't.  That matters because NTPD can use the TSC for interpolation between clock ticks (whose interrupt period is
15.625 msecs).  You cannot let your computers sleep; NTPD cannot work if the CPU enters certain sleep states.  I use and much prefer using the High Performance Event Timer (HPET) to the TSC for interpolation since it has a 3 times higher frequency than the TSC.  Others may say that the HPET has a higher latency than the TSC, which is true.  How you set up the computer to do this depends on the O/S.  Under Windows 7 and later "run cmd as admin and paste 'bcdedit /set {current} useplatformclock Yes'" (w/o the single or double quotes).  My copy of FreeBSD always chooses the HPET; I am not sure what Linux uses for a performance counter for timing.

>*         Is there any why to force NTP server-2 to trust NTP server-1 no
matter what?

The NTP Cheat Sheet here
(https://www.meinbergglobal.com/english/sw/ntp.htm#ntp_cheat_sheet) lists a true option for the conf file, as in

server 192.168.0.5 iburst minpoll 4 maxpoll 4 true

While I have never used this option, the Cheat Sheet says it makes the host computer think the server is always a true chimer.

>*         Is there any why to run under Inner NTP server-1 , two services
of ntpd(one as client and one >for server). The server will sync externally, and the client will serve  Inner NTP server-2 by syncing to >it's disciplined clock.

No, I don't think so.  NTPD completely takes over the computer's clock by changing the nominal interval between clock ticks (the time adjustment factor), so every time the clock interrupt hits, more or less time is added to the current time.  I don't think there is any why more than one program could control the time adjustment factor.

Charles Elliott

-----Original Message-----
From: questions
[mailto:questions-bounces+elliott.ch=comcast.net at lists.ntp.org] On Behalf Of Natalie Abravanel
Sent: Wednesday, February 10, 2016 12:55 PM
To: questions at lists.ntp.org
Subject: [ntp:questions] NTP refuse to sync

Hey,
I have the following requirements for syncing:

*         External NTP : it can be any configuration, active directory,
Centos, virtual machine.

*         Inner NTP server-1 sync only to one server source (the external
NTP above), and also uses orphan mode in case the external is not reachable.

*         Inner NTP server -2 - sync only to one server source (the inner
NTP 1)
Description & questions

*         Inner NTP Server- 1 was used to be synced only to its Local, that
way inner 2 and inner 1 had a minor offset. I must maintain this behavior.

*         Once adding the external sync- we would like to support 5 min
offset as maximum (running ntpd in slew mode -x under inner 1), Inner NTP server-1, accept the external NTP as a valid source synchronization, and starts a synchronization process with the external ntp. While NTP server-1 is synching (offset is getting down in a rate of not more then 0.5 MS per second), Server NTP 2 refuse to sync for a while, getting to gain offset from inner NTP-server1 - which I must avoid. (after 13 hours running we get low offsets(I have all outputs...))

*         Is there any why to force NTP server-2 to trust NTP server-1 no
matter what?

*         Is there any why to run under Inner NTP server-1 , two services of
ntpd(one as client and one for server). The server will sync externally, and the client will serve  Inner NTP server-2 by syncing to it's disciplined clock.

I have Inner1+ inner2 configurations (and also a running results) if needed!



10x,

In advanced, I will appreciate any ideas!



_______________________________________________
questions mailing list
questions at lists.ntp.org
http://lists.ntp.org/listinfo/questions



------------------------------

Subject: Digest Footer

_______________________________________________
questions mailing list
questions at lists.ntp.org
http://lists.ntp.org/listinfo/questions

------------------------------

End of questions Digest, Vol 136, Issue 6
*****************************************


More information about the questions mailing list