Re: [chrony-users] Searching for reasoning on design decisions

[ Thread Index | Date Index | More Archives ]

rony was designed by Curnoe. He finally gave up about 10 years ago and Lichvar
took it over, but did not change the design.chrony uses a least squares fit,
with an estimator as to how well the LSF actually fits the data, and
withdrawing the older points until it does fit. (eg if there were a strong
second order curve to the data, as evidenced by the LSF having long stretches
of errors from the linear curve of the same sign, it reduces the length of
time over which the LSF is applied. NPTD does a local, essentially Markovian
estimator.for the offset and the rate. Mills argues that he spent time making
sure that his approach was stable. The same degree of formal testing has not
been applied to chrony, however, all tests in a real life shows that chrony is
a) stable, and b) is usually far more accurate (smaller deviation of the
offsets and better estimation of the rate)  than is NTPD.

In both cases the code is essentially the documentation.

While chrony uses a linear estimator, the pruning of the points used in making
the estimates is non-linear.

William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_

On Tue, 27 Jun 2023, Marc Compere wrote:

[CAUTION: Non-UBC Email]
This sounds pretty interesting Julian. 

You’re asking great questions and I’d like to know the answers as well. 

Miroslav Lichvar is probably the best source for recent and perhaps even prior design choices.


From: Julian Steinmann <jsteinmann@xxxxxxx>
Sent: Tuesday, June 27, 2023 3:28 PM
To: chrony-users@xxxxxxxxxxxxxxxxxxxx <chrony-users@xxxxxxxxxxxxxxxxxxxx>
Subject: [chrony-users] Searching for reasoning on design decisions  

I'm a bachelor student at ETH Zurich and am currently working on my
bachelor thesis, which is about helping in implementing a new clock
synchronisation approach called G-SINC.
G-SINC (, paper linked in README)
focuses especially on byzantine fault-tolerance and builds on a new
internet architecture called SCION.

Right now I am focusing on implementing the sample offset interpolation
algorithm. We have already implemented a PLL-based algorithm, taken from
Ntimed by Poul-Henning Kamp and are exploring an approach using the
Theil-Sen estimator, but are also looking at re-implementing the
existing algorithms in chrony and ntpd.
In all of this, chrony is basically our "gold standard" when it comes to
accuracy and design approaches.
However, I haven't found much reasoning why e.g. weighted linear
regression is used in chrony for NTP samples, whilst a robust linear
regression (Least Absolute Deviations) is used for RTC samples and
manual input (I hope I'm not mistaken in my reading of the code).

Is there some place where these design decisions are justified? For
ntpd, there is of course the Computer Network Time Synchronisation book,
but David L. Mills seems to reach different conclusions than chrony does...
I hope I haven't overlooked some obvious place to search; otherwise, I'm
very sorry for bothering the list.

Best regards,

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+