Re: [chrony-dev] [GIT] chrony/chrony.git branch, master, updated. 2.4-9-g6cd5583

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




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       |  www.theory.physics.ubc.ca/

On Wed, 29 Jun 2016, Miroslav Lichvar wrote:

On Tue, Jun 28, 2016 at 07:58:40AM -0700, Bill Unruh wrote:
Is there some way to automate the determination of the best offset and slope
correction to apply due to network assymetries. If one plots the offset vs the
delay, one often gets a scatter plot in which there is a definite slope to the
result, suggesting that there is a persistant assymmetry to the round trip
time (see the scatter plots in www.theory.physics.ubc.ca/chrony/chrony.html
Note that in some of the cases, one event with a huge offset will make the
plot a bit useless, but in general, it seems that most of the variation in
the round trip time
takes place on one of the legs of the trip.
Ie, if one took out the slope, one would reduce the uncertainty by a factor of
2 or so. (Ie, actual offset = offset - .5 (roundtrip-minroundtrip)  for example.)

Yes, if the network jitter is asymmetric, it makes sense to modify the
calculation of the offset and shift the weight to the direction which
has smaller jitter. If the asymmetry is significant, this can improve
the accuracy of the clock by orders of magnitude. In ntpd there is an
option to enable a huff-n-puff filter, which simply selects the
direction (slope of -0.5 or +0.5) which gives smaller offset. The clock
sticks to one leg. If the jitter is symmetric this hurts the accuracy,
so it's not enabled by default.

In chrony, there is a filter which drops measurements that have
significantly larger delay than previous measurements. It's enabled by
default and it works well in situations when the large delay is not
random, e.g. when the link is temporarily congested due to a download.
If the large delay is more common and random, this doesn't work well.

I'm very interested in implementing some estimation of the asymmetry
to chrony. I'd like to allow any slope between -0.5 and 0.5, not just
one of the three values (-0.5, 0.0, +0.5). One idea I had was to
search for a value which minimizes the variance in the linear
regression when all points have a constant weight. With each new
sample, the asymmetry would be estimated first and then the offsets
would be adjusted for the weighted regression which is currently used
to estimate the offset. Basically I'm looking for a constant A between
-0.5 and 0.5 which minimizes the variance in linear regression of
points (x, y + A * d), where x is time, y is the symmetric offset and
d is the increase in delay over the minimum. Can A be calculated
directly from (x, y, d) samples? I suspect it would have to be an
iterative approach and this might be expensive.

No, that would just be a two, instead of one, variable linear regression,
One would just minimize (y-C(x-x0)+Ad)^2 over C, x0 and A. Still linear
equations.


--
Miroslav Lichvar

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


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


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