Re: [chrony-users] Specifying refclock accuracy

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Wed, Sep 20, 2023 at 01:53:54PM +0700, James Clark wrote:
> I'm a bit unclear about how a refclock is supposed to specify how
> accurate it is. There are the delay and precision options. I think I
> understand what the docs say about delay. But I'm less clear about
> precision. What are the semantics of that, how does it impact what
> chrony does and how is it related to delay?

Precision sets the expected consistency in reading of the reference
clock, e.g. due to resolution. It's mainly used in PHC tracking
(refclock and HW timestamping) as the expected noise floor. The
default and minimum accepted value is the estimated system clock
precision (how much it takes to read) or the value set by the
clockprecision directive.

> The other thing I'm not
> clear about is how the precision and delay relate to the figure shown
> for the margin of error (after +/- in the last column of the chrony
> sources output).

The +/- value is the NTP root distance, which contains half of the
root delay and whole root dispersion, which includes the precision.

> As a concrete example, for a PHC extpps source (with no link to
> anything) connected to the PPS output of a GPS whose datasheet
> specifies a 30ns RMS accuracy, what should I specify for delay and
> precision and how do I get a sensible figure for margin of error? I've
> tried various figures in the range 10ns-100ns for delay and precision,
> but the margin of error remains in the 700ns-800ns range. The margin
> of error figure is similar to the dispersion figure in the refclocks
> log, so I'm guessing that's the main cause. Why is the dispersion so
> large and is there anything that can be done to fix it?

It contains half of the delay in reading of the PHC, mostly coming
from the PCIe delay. The only way to avoid that is cross timestamping
(e.g. PTM).

The refclock precision should be set to the expected stability of PHC
readings. With the I210 and CPU running at a constant frequency that
might be around 20ns. The delay can be set to 60ns corresponding to
the 30ns accuracy of the GPS receiver.

> At the other end of the scale, for a SOCK refclock for GPS messages
> where there's say 0.1s variation in the time the message is received,
> what is the right thing to put in refclock so that chrony won't treat
> it as a false ticker? Would it be delay 0.2? Is precision relevant
> here?

Yes, 0.2 assuming the offset is set to the middle of that interval.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/