[systemd-devel] [PATCH 6/8] timesyncd: allow two missed replies before reselecting server

Miroslav Lichvar mlichvar at redhat.com
Tue Sep 2 04:17:30 PDT 2014


On Fri, Aug 29, 2014 at 06:31:10PM +0200, Kay Sievers wrote:
> On Wed, Aug 27, 2014 at 4:47 PM, Miroslav Lichvar <mlichvar at redhat.com> wrote:
> > After receiving a reply from the server, allow two missed replies before
> > switching to another server to avoid unnecessary clock hopping when
> > packets are getting lost in the network.
> 
> Hmm, what's the reason to do this? The servers in the list are not
> better or worse or sorted, are they?

No, they are not, but offsets measured from different NTP servers are
usually different (as the clocks are never exactly accurate, there are
asymmetries in the network, etc.), so reselection introduces an offset
that has to be corrected, possibly by stepping the clock. Also the
polling interval may be shortened unnecessarily.

Allowing few missed replies avoids reselection on every lost packet.

-- 
Miroslav Lichvar


More information about the systemd-devel mailing list