[ntp:questions] NTP setup in time sensitive environment

Mike Cook michael.cook at sfr.fr
Thu Apr 23 07:32:17 UTC 2015


I can’t remember the previous thread but I expect you got good advice and ignored it. 

> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> We are trying to setup NTP in our subsystem in a LAN environment for
> time-sensitive systems.

If time « sensitivity » is a prime objective, then a sufficient and robust time distribution network has to be designed. This is obviously not the case with what your setup is describing. In the previous thread, I can not imagine the many knowledgable contributors here would have not pointed it out. That is why I suspect that you have ignored good advice. If this requirement is for business applications it is up to the IT directors to budget for this mission critical requirement. It cannot be skimped.

SO.  As the Monty Python sketches often pointed out «  Start Again » . See ntp.org for good architecture hints here. 

That said. My 2cents (payable through paypal).

> But, we are facing some challenging issues in terms of minimizing the time
> offset from the NTP time server.
> *Setup:*
> PC_V syncs to an external NTP time server PC_NTP which could be within the
> same network or could be an external time server listed on NTP.org
> PC_A and PC_B sync to PC_V which are in the same isolated subnet since PC_A
> and PC_B are not exposed to external network.
> PC_A, PC_B, PC_V could restart atleast once a day and might even be
> restarted few times a day.
> All PCs have Windows 7 x64 bit installed, have gigabit network with no
> network congestion and we are using ntp 4.2.8p1.
> *NTP Commands used:*
> *Sync: *ntpd.exe -g -N -q -c "Sync Config file"
> *Drift:* ntpd.exe -g -N -c "Drift Config file"
> *NTP Configuration:*
> *Sync Config file includes:*
> server xxxx iburst burst
> *Drift Config file includes:*
> server xxxx burst minpoll 3 maxpoll 6 prefer true
> tinker step 0
> tinker panic 0
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *Requirements: *Requirement is to setup NTP on these PCs in such a way that:
> 1) Time Sync between PCs as accurate as possible,  lets say within +/-5ms.

  This is not strictly the same as saying as you do above, as minimizing the offset with the NTP server.  If as you admit, your only NTP server PC_V is down, any client which only has this as a source ( another NoNo )will be drifting away according to the quality of its local clock. If you are seriously accepting that there is the probability that clients will be without a server , BUT must remain sync’d with each other, then you should be « peer »ing them, as well as configuring the server PC_V.

> 2) Time Offset between PCs shall remain as low as possible for as long as
> possible, lets say within +/- 5ms offset for 24 hours.

 As indicated above, if you do not peer, and there is a weak server tree, then you have no chance. 

> 3) PC_V might be able to talk to only one NTP time server within network,
> lets say at stratum level 5.

 This is a NoNo . 

> But, it is important to keep the time offset as low as possible, lets say
> within +/- 5ms offset.

 As indicated, this is a requirement incompatible with the resources at hand.

> *Actuals:*
> 1) Time offset between PCs after Time sync could be within +/- 100ms.

  You need to more data to get any useful response here. Take ntpq -pn data at say 30 second intervals from server and client over a « sync » cycle.

> 2) The clocks could have an offset of +/- 60ms within few mins after sync.

 You don’t give hard figures for analysis (see above), but this seems excessive for modern hardware and may indicate either bad hardware, unlikely, or that the system is chasing its tail with a bad drift file value, or that the clock is being steered by something else than NTP. Is your Windows Time Service disabled on all systems running NTP.

> Even on overnight runs using loopstats and peerstats, we see that the
> offset of system time from NTP time could be +/-50ms.

see above

> 3) As per the following link, we should be using atleast 4 time servers for
> maintaining accuracy:
> http://support.ntp.org/bin/view/Support/StartingNTP4
> But how do we assure that the time offset is minimal.
> *Questions:*
> 1) How can we assure that the sync will consistently result in +/- 5ms
> offset?
> 2) This seems to defeat the whole purpose of synching if the offset cannot
> be maintained!
> Is there a way to force the system offset to remain within +/-5ms?

NTP does it’s best to get offsets as low as possible. With Windows 7 I have offsets sub millisecond with no problem, but then I have a correctly configured network.

> 3) Can we live with just 1 time server PC_NTP and PC_V, PC_A and PC_B will
> closely following that time no matter?

 Dream on.      

> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Thank you all.
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions

"Ceux qui sont prêts à abandonner une liberté essentielle pour obtenir une petite et provisoire sécurité, ne méritent ni liberté ni sécurité."
Benjimin Franklin

More information about the questions mailing list