[ntp:questions] NTP in a Linux cluster

Unruh unruh-spam at physics.ubc.ca
Mon Sep 7 20:32:11 UTC 2009


Lorcan <lorcan.hamill at gmail.com> writes:

>Folks,

>Could any NTP experts suggest how I should best configure NTP in
>a loosely-coupled Linux cluster, where intra-cluster synchronization
>is
>the top priority?

>I have done some reading about NTP, but can't seem to find an
>authoritative
>guide to using NTP in a cluster environment.  My company sells systems
>that
>run on small clusters of Linux servers - typically from 2 to 16
>servers ("nodes"),
>each running RedHat Linux.  All nodes in a cluster are equal.  We
>don't use
>any third-party clustering software, just the standard OS and our own
>applications.

>The main priorities are:

>1)  Time must be kept closely synchronized between all nodes in the
>cluster.

Designate two or three or four of the servers as the primaries, and tell
the other machines to use them as the ntp servers. Have them get the
time from the net or from GPS.

>2)  If one or more nodes become unavailable, synchronization must
>still be
>     maintained.

Make sure you have at least 4 nodes as servers.


>3)  Time must never go backwards, or jump - all changes must be by
>"slewing"

Use chrony instead of the reference ntp. It does not jump unless you
tell it to (eg at bootup).


>4)  Time should track one or more external NTP servers as closely as
>possible,
>      while observing (1) to (3) above.

>The key requirement here is the as-close-as-possible synchronization
>between
>nodes in the cluster; that is far more important than closely tracking
>the external
>NTP server(s).

What does "as close as possible" mean? 1nsec? 1usec? 1msec? 1 sec? 1
day?


>How would an NTP guru go about configuring a cluster to meet those
>requirements?

You have not supplied requirements. 


>It would be preferable if the configuration of all nodes could be
>identical.   A solution
>that requires two or more node types ("master" and "slave" perhaps)
>with different
>settings would be acceptable, of course, if the preferred one-size-
>fits-all approach
>is impossible.

Or you could supply each machine with a gps receiver. 


>Should all nodes have configuration entries for all other nodes as
>"peers"?

Nope. That will result in all of them ratcheting up their level until
they fall off the end.  ntp is a tree. A->B->C and never backwards. You
do not want loops (A->B->C->A)


>Should all nodes (or only one) have configuration entries for the
>external NTP server(s)?

Up to you and your cluster security issues. 


>If all nodes have both peer and external server entries, how can I
>arrange that
>keeping in sync with peers is seen as more important than keeping in
>sync with
>the external servers?

>Questions, questions...

>Any and all answers would be gratefully received!

>Thanks in advance,

>Lorcan Hamill




More information about the questions mailing list