✘(im)Precision in ntpd

Gary E. Miller gem at rellim.com
Mon Oct 10 18:55:44 UTC 2016


Yo All!

I have been chasing down an anomaly in the jitter data.  See attached.

Before: peer-jitter-127.127.28.1-A.png

After: peer-jitter-127.127.28.1-B.png

You'll notice that all the data better than 0.954 µs is gone in the
first plot. ntpd has been throwing away data that is 'too precise'!

Gack!

What does that mean for the numbers?  There are a lot of small offsets
that ntpd has been throwing away, so by not throwing them away, but
instead using them, the std deviation of the 4 important metrics gets
cut by about 25%.  The 97% and 90% ranges get cut by about 10%.

Not bad for a two line patch.  I'll be pushing the basic patch today,
and later I found several similar losses of 'precision' in the code.
More on those later, but this appears to be the big win.

Here are the raw numbers, before:

  Local Clock Time Offset

    Percentiles: Max: 21.312, 99%: 4.511, 95%: 1.327, 50%: -0.046,
                 5%: -1.319, 1%: -3.298, Min: -19.823 µs
    Ranges: 99% - 1% = 7.809 µs,   95% - 5% = 2.646 µs
    Deviation: Mean = 0.032 µs,   1σ = 1.307 µs

  Local Clock Frequency Offset

    Percentiles: Max: -6.438, 99%: -6.701, 95%: -7.038, 50%: -7.407,
                 5%: -8.175, 1%: -8.239, Min: -8.269 ppm
    Ranges: 99% - 1% = 1.538 ppm,   95% - 5% = 1.137 ppm
    Deviation: Mean = -7.504 ppm,   1σ = 0.353 ppm

  Peer Clock Offset: 127.127.28.1

    Percentiles: Max: 21.313, 99%: 4.512, 95%: 1.328, 50%: -0.047,
                 5%: -1.320, 1%: -3.299, Min: -19.824 µs
    Ranges: 99% - 1% = 7.811 µs,   95% - 5% = 2.648 µs
    Deviation: Mean = 0.032 µs,   1σ = 1.308 µs


  Peer Clock Jitter: 127.127.28.1

    Percentiles: Max: 19.992, 99%: 3.866, 95%: 2.157, 50%: 0.954,
                 5%: 0.954, 1%: 0.954, Min: 0.954 µs
    Ranges: 99% - 1% = 2.912 µs,   95% - 5% = 1.203 µs
    Deviation: Mean = 1.157 µs,   1σ = 0.630 µs

After:

  Local Clock Time Offset

    Percentiles: Max: 6.075, 99%: 3.765, 95%: 1.203, 50%: -0.039,
                 5%: -1.192, 1%: -3.352,   Min: -17.125 µs
    Ranges: 99% - 1% = 7.117 µs,   95% - 5% = 2.395 µs
    Deviation: Mean = -0.007 µs,   1σ = 0.992 µs

  Local Clock Frequency Offset

    Percentiles: Max: -5.903, 99%: -6.179, 95%: -6.490, 50%: -6.855,
                 5%: -7.339,   1%: -7.354,   Min: -7.373 ppm
    Ranges: 99% - 1% = 1.175 ppm,   95% - 5% = 0.849 ppm
    Deviation: Mean = -6.892 ppm,   1σ = 0.298 ppm

  Peer Clock Offset: 127.127.28.1

    Percentiles: Max: 6.075, 99%: 3.760s, 95%: 1.206, 50%: -0.037,
                 5%: -1.202, 1%: -3.353,   Min: -17.126 µs
    Ranges: 99% - 1% = 7.113 µs,   95% - 5% = 2.408 µs
    Deviation: Mean = -0.006 µs,   1σ = 0.993 µs

  Peer Clock Jitter: 127.127.28.1

    Percentiles: Max: 17.207, 99%: 3.633s, 95%: 2.170, 50%: 0.481,
                 5%: 0.151, 1%: 0.103,   Min: 0.046 µs
    Ranges: 99% - 1% = 3.530 µs,   95% - 5% = 2.019 µs
    Deviation: Mean = 0.754 µs,   1σ = 0.767 µs


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588
-------------- next part --------------
A non-text attachment was scrubbed...
Name: peer-jitter-127.127.28.1-A.png
Type: image/png
Size: 14698 bytes
Desc: not available
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20161010/29a921fa/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: peer-jitter-127.127.28.1-B.png
Type: image/png
Size: 15531 bytes
Desc: not available
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20161010/29a921fa/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20161010/29a921fa/attachment.bin>


More information about the devel mailing list