[ntp:questions] Advice for a (LAN-interconnected) WLAN Testbed w/ ARM nodes

Miroslav Lichvar mlichvar at redhat.com
Tue Aug 3 15:53:43 UTC 2010

On Mon, Aug 02, 2010 at 10:10:15PM +0200, Florian Sesser wrote:
> Do you have advice for me how to improve the accuracy on the nodes to
> the order of 1 ms (or below)? I have googled quite a bit, but the amount
> of information is overwhelming, and I cannot afford nor attach GPS or
> other external clock sources to the nodes. (In fact, I cannot change the
> cabling or HW setup in any way.)

> We are running ISC ntpd 4.2.4p6. Here's our ntp.conf config
> (omitting #comments):
> > restrict
> > driftfile  /tmp/ntp.drift
> > server iburst
> So the ntpd setup is quite simple at the moment.
> I am willing to try any patches to the kernel / ntpd, I just don't know
> where to go at the moment. Maybe there is much lower hanging fruit, but
> being the ntp newbie I am, I cannot see it. If I absolutely need more
> ntpd stratum 2 servers in the network, I can maybe lobby to get some,
> but any easier option is of course preferred (what about that broadcast
> option again? does it only reduce load or also improve accuracy?)

Unless the ethernet network is heavily loaded, getting the nodes
synchronized to 1ms should be possible, without kernel patching or
any extra NTP servers.

Don't use the broadcast mode, it's mainly useful to reduce the load.

The most important thing is to set minpoll and maxpoll for the server
specified in ntp.conf. Generally, lower is better unless the network
load to the NTP server is a concern. With ntp-4.2.4 the allowed
minimum is 4, with 4.2.6 and it's 3.

This alone probably will be enough to get the accuracy below 1 ms.

If not, depending on network jitter and how stable are the clients'
clocks, you might want to consider disabling the kernel discipline and
using the daemon loop in FLL mode instead. With low jitter and low
quality clocks and/or high temperature variations, this can improve
the accuracy up to factor 20, in the opposite case it can make it
about 8 times worse, assuming the kernel is compiled with SHIFT_PLL=4.

For example:
server iburst minpoll 4 maxpoll 4
disable kernel
tinker allan 16

The allan parameter specifies at what update interval will be FLL
used, set it to the polling interval to ensure it's always enabled.
With ntp-4.2.4 it's specified in seconds, with 4.2.6 it's a power of

Miroslav Lichvar

More information about the questions mailing list