[ntp:questions] Clock and Network Simulator

Miroslav Lichvar mlichvar at redhat.com
Wed Jun 30 17:19:29 UTC 2010

On Tue, Jun 29, 2010 at 06:31:01PM +0000, David L. Mills wrote:
> From your description your simulator is designed to do something
> else, but what else is not clear from your messages. It might help
> to describe an experiment using your simulator and show what results
> it produces.

It's designed to test NTP implementations, but it uses a more general

Ntpdsim tests ntpd as an NTP client with simulated NTP servers in a
simulated network. Clknetsim doesn't simulate NTP servers, it
simulates only a network to which are connected real NTP clients and

The difference is that ntpdsim tests one NTP client and clknetsim
tests whole NTP network.

Say we want to test how does the Linux SHIFT_PLL change affect an NTP
network. There is a chain of seven ntpd daemons configured, all using
poll 6. Strata 1, 3, 5, 7 have SHIFT_PLL 2 and strata 2, 4, 6 have
SHIFT_PLL 4. Stratum 1 has clock with zero wander and frequency offset
and is using the LOCAL driver, the rest have clocks with 1ppb/s
wander. Between all nodes is network delay with exponential
distribution and a constant jitter. The simulations are repeated with
jitter starting from 10 microseconds and increased to 0.1 second in 28
steps. Each simulation is 4000000 seconds long and the result is a
list of RMS offsets, one for each stratum.

After finishing all iterations, we'll make an RMS offset/jitter plot:


And the same experiment with all strata using SHIFT_PLL 4:


You probably know what to expect here, but I was surprised to see that
with high jitter the SHIFT_PLL 4 strata are actually better than their
SHIFT_PLL 2 sources.

Miroslav Lichvar

More information about the questions mailing list