Re: [chrony-dev] Poll adjust after long time unreachable?

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


On Mon, 19 Aug 2013, Miroslav Lichvar wrote:

On Fri, Aug 16, 2013 at 11:07:04AM -0700, Bill Unruh wrote:
On Fri, 16 Aug 2013, Miroslav Lichvar wrote:
One reason for a larger number of missed polls might be overloaded
server. If all clients dropped to minpoll immediately, it would only
make it worse. I'd suggest to focus on improving the adjustment from
the error in the prediction instead of hardcoding a drop to minpoll.

Hmm. valid point. But I suspect that the more usual case is that the internet
connection goes down for a while. This means that it takes a long time for the
system to respond when the internet comes up again especially as it has
climbed in poll interval while the network was down. And I am not suggesting
that they drop to minpoll immediately (tx_count >5 so that means 4 missed
return packets). Thus at poll 10, it takes 20 min for the system to finally
get another packet, and then it will take a few of those for the system to
finally drop down in the poll interval. Ie, it could take a long time to
recover from a dropped network. One of the nice features of chrony is the
rapidity of its response, and this works against that.

The check error in the prediction vs peer distance should reduce the
poll interval if the connection was down for a long time.

I have not looked at this code (at least not near enough in time that memory
could resurect it) so I do not know if this would solve the concern.


Also, if the reason for the disconnected network is unplugged cable or
unassociated wlan, the system scripts should call chronyc offline and
chronyc online when the connection is back. If this is working
correctly, the polling will be restarted immediately.

The network going down is usually not planned. It just happens (fuse blows on
the router, someone cuts the wire, etc)
And chrony should be able to recover quickly for such unplanned events.




By the way, have you ever thought about making chrony use say a quadratic
predictor, rather than just a linear? Not sure if that would make the
prediciton better or worse in some cases however. In general for slow drifts
in the rate it should make it better. But sometimes on severe changes, it
could make things worse.

I didn't thought of that. If the changes in the frequency are random,
could a quadratic predictor really improve the error?

For  short term random, no. But for long term changes, it could. For example
the crystal ages, and the frequency goes down. over a long time ( hours, days)
Or the temperature changes over hours. Both would be expected to have a
relatively show change in frequency which a quadaratic term should capture.

Clearly short terms frequency fluctuations  are not captured.

From the tests I have done in the past, the weakest link in the
chrony loop seems to be the code which determines how many samples
should be used in the linear regression.

Yes, that is the non-linearity in the process. At what point does linear
regression fail. One could fit a high order polynomial and demand that the
higher order terms be small. The counting of changes in sign of the deviations
is a crude way of determining when the fit gets bad. I do not knw if there are
well developed procedures in the statistics literature for this kind of
decision procedure.




--
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/

--
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/