gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Garmin 18X-5Hz


From: Miroslav Lichvar
Subject: Re: [gpsd-users] Garmin 18X-5Hz
Date: Tue, 16 Aug 2016 09:32:37 +0200
User-agent: Mutt/1.6.2 (2016-07-01)

On Mon, Aug 15, 2016 at 12:44:21PM -0700, Gary E. Miller wrote:
> On Mon, 15 Aug 2016 15:43:48 +0200
> Miroslav Lichvar <address@hidden> wrote:
> > When the cron job heats up the CPU, the loop is too slow to
> > handle such a rapid change in the frequency of the clock and a large
> > offset accumulates before it can catch up.
> 
> Can't be.  I set my clock to a fixed speed (performannce govenor), not
> ondemand.

I mean frequency of the oscillator on which is based the system clock.
As the temperature increases the clock slows down and ntpd/chronyd has
to tell the kernel to speed up the system clock to compensate for that
change. 1 part per million is a very small change, but as you can see
its a big problem when trying to keep the clock stable to few
microseconds.

> > Halving the polling interval (which sets the time constant of the
> > loop) should halve the excursion.
> 
> Sadly, I've tested that, and exactly the opposite happens. ddrown was
> just showing me how the SAMPLE() macro in ntpd works.  It takes very
> sample it gets, linda sorta once a second, and averages them between
> minpoll.  So a longer minpoll allos the bad reading to get sampled out.

Yes, longer minpoll increases the number of filtered samples per clock
update, so the estimate of the offset should be more accurate. But if
the loop is too slow to keep up with the rapid changes in frequency,
increasing minpoll will only make it worse. In your configuration
which gives you 30 us swings if minpoll was decreased by one, they
should drop to about 15 us.

> > http://i.imgur.com/0ma3Bdj.png
> > http://i.imgur.com/zh1YTia.png
> 
> Are those on Raspberry Pi's?

No, it's an Intel machine with active cooling. On the graph you can
see the frequency changes rapidly in both directions. On a Pi with no
cooler the temperature goes up quickly, but it cools down slowly, so
the offset swings only to one direction.

> If I turn off on-box stats my numbers look like your 2nd one.

Well, yes, that's the point I was making. You need to keep the
temperature stable (e.g. not running any CPU-intensive tasks) if you
want ntpd to work well. 

-- 
Miroslav Lichvar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]