Re: strange behaviour of ntp peerstats entries.




OK, having looked at the code, I see what it is doing. It essentially
takes the measurement with the shortest delay in the past 8 measurements.
If that measurement happens to be the current one, it is actually used
in the clock loop. (Yes, I know this characterisation of the clock filter is cruder
than reality).


This makes the smaller variance of chrony even more impressive, since in my
tests, evey single measurement of offset was used to calculate the variance
in the case of chrony, while
for ntp, only those "smallest" values as reported in peerstats were used. This also
explains why the roundtrip variance in ntp was so much better than chrony's.




Unruh <unruh-spam@xxxxxxxxxxxxxx> writes:

Having been testing ntp, I was looking at the peerstats file. Here is a
sequence of such measurements.

54489 29187.448 137.82.1.3 9414 0.005089025 0.016225398 0.067088246 0.001122070
54489 29269.446 142.103.234.11 9614 0.003231929 0.015419416 0.009606450 0.001005171
54489 29316.445 137.82.1.3 9414 0.005089025 0.016225398 0.067796410 0.000929591
54489 29396.445 142.103.234.11 9614 0.002083530 0.015706261 0.007395887 0.000386142
54489 29443.447 137.82.1.3 9414 0.005089025 0.016225398 0.067421760 0.001041993
54489 29523.443 142.103.234.11 9614 0.002083530 0.015706261 0.009098914 0.000252795

I thought that there was an entry in this file for each packet exchange
with the server. But notice the entries at 29396.445 and 29523.443 seconds.
The offsets are completely identical. There is no way that this could be
true if this were really the outcome of a measurement. There is just no way
that you would get two entries the same to 7 decimal places ( well, it is
really only 4 since the machines have a resolution of a microsecond). And
there are a number of these. This simply cannot be the offset as obtained
from a measurement.
What do these entries mean? How can the two offsets be identical?

Note that I was watching successive output from ntpq -p at the same time.
and the "when" entry went from 122 to 34-- ie indicated that a measurement
was made-- and the offset did not change at all. Just before this in the
peerstats file there were 7 entries with identical offsets and identical
roudtrip delays. What is happening here? What does the "offset" and
"roundtrip delay" mean if not the measured offset (t4-t3+t1-t2)/2 and
roundtrip (t4-t1) on each measurement?




.



Relevant Pages

  • Re: ntpd PLL and clock overshoot
    ... The initial frequency estimate measures only the frequency offset; the phase offset is left to fend for itsel, which could indeed result in an initial offset exceeding the "overshoot" target. ... If the initial offset is greater than the step threshold, the clock is set, which results in an initial offset of zero. ... If the initial offset is less than the step threshold, the freqjuency measurement is made, but the phase is disciplined normally during the stepout interval. ...
    (comp.protocols.time.ntp)
  • Re: ntpd PLL and clock overshoot
    ... The initial frequency estimate measures only the frequency offset; the phase offset is left to fend for itsel, which could indeed result in an initial offset exceeding the "overshoot" target. ... If the initial offset is greater than the step threshold, the clock is set, which results in an initial offset of zero. ... If the initial offset is less than the step threshold, the freqjuency measurement is made, but the phase is disciplined normally during the stepout interval. ...
    (comp.protocols.time.ntp)
  • Re: Dual ADCs
    ... Each 'measurement' comprises a low and a high-gain signal in the time ... low-gain signals, a linear least squares fit is used to determine the ... the gain and offset values are determined independently. ...
    (comp.dsp)
  • Re: Noise created by resistor used to reduce op amp input offset
    ... much better than trying to reduce offset by adjusting trim ... If the measurement time takes only 1 second, ... The az filter only makes sense if the autozeroing is ...
    (sci.electronics.design)
  • Re: Michelson-Morley experiment
    ... > Distance isn't defined by a number of knots on a rope. ... > possibility of introducing measurement error. ... on the back of a low-loader, so the best way is the old tape measure. ... Well, there are two considerations, gain and offset. ...
    (sci.physics)