Re: [chrony-dev] Question / Feature suggestion - trimrtc on start?

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


On Wed, Jul 20, 2011 at 03:15:14PM -0700, Bill Unruh wrote:
> You could do the 11 min mode. That would mean that the offset was always very
> very close to zero when the device is switched off, but the rate is unknown.
> But, if Lichvar is right, you might never get a good rate anyway because the
> rate checking occurs too rarely. (On my system rtc is checked 400 times a day
> roughly, so that is about once every 5 min)

The interval starts at 15 seconds and increases with number of samples
currently help. The number of samples depends on the runs test. It
doesn't work well when the error is not random, which I suspect is
happening on my machine (with a PPS refclock, skew better than 0.01
ppm). From the rtc log:

====================================================================
   Time   RTC fast (s) Val   Est fast (s)   Slope (ppm)  Ns  Nr Meas
====================================================================
10:04:06      -0.388507 0        0.000000         0.000   1   0   15
10:04:23      -0.389154 1       -0.389154       -46.706   2   0   15
10:04:40      -0.389682 1       -0.389682       -38.882   3   0   15
10:04:57      -0.390399 1       -0.390425       -36.441   4   3   15
10:05:29      -0.391075 1       -0.391167       -28.215   5   3   30
10:06:01      -0.396096 1       -0.392982       -38.882   6   3   30
10:07:03      -0.381225 1       -0.395087       -37.154   7   4   60
10:08:05      -0.381764 1       -0.381764        39.362   8   4   60
10:09:07      -0.382460 1       -0.382393        27.867   9   5   60
10:10:09      -0.383851 1       -0.380748        27.614  10   4   60
10:12:11      -0.385145 1       -0.385120         8.948  11   4  120
10:14:13      -0.386301 1       -0.383028        11.897  11   4  120
10:16:15      -0.387447 1       -0.387447        -9.427  10   4  120
10:18:17      -0.388363 1       -0.388363        -8.787  11   4  120
10:20:19      -0.389204 1       -0.389446        -8.878  11   4  120
10:22:21      -0.389855 1       -0.390516        -9.091  11   4  120
10:24:23      -0.390382 1       -0.390893        -7.690   8   3  120
10:25:25      -0.390917 1       -0.391195        -7.281   8   3   60
10:26:27      -0.391355 1       -0.391355        -6.383   8   3   60
10:27:29      -0.392709 1       -0.391765        -6.403   9   4   60
10:28:31      -0.393318 1       -0.392286        -6.570  10   4   60
10:30:33      -0.394296 1       -0.394296        -9.026   8   4  120
10:31:35      -0.395293 1       -0.395110        -9.759   9   5   60
10:32:37      -0.396307 1       -0.395734        -9.822  10   5   60
10:34:39      -0.397305 1       -0.397388       -11.359  10   6  120
10:36:41      -0.398086 1       -0.398300       -10.195  11   6  120


> >So the only options to call trimrtc seem to be:
> >
> >1) On boot.  Seems highly safe if done early in chrony startup since it
> >should simply emulate a fixed step in time
> >2) Occasionally every X hours, where I'm hoping for some feedback on a
> >good number for X.  I have to assume that my device will often run for
> >days on end, but often only for a few mins/hours at a time.

Enable the rtc log and see how quickly the drift value converges and
how stable it is.

But I'm not sure if trimming rtc on start will help you that much. If
the machine is turned off for days, will it really make a difference
that the initial step is only 10 seconds instead of 100 or 1000?
Wouldn't it be better to make the step as early in the boot as
possible and not care about its size?

Maybe hwclock is better for your requirements. If the --systortc
option was used only once per session, the calculated drift could be
more accurate as it would include the time when the machine was turned
off.

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


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