Puzzling clock offset spikes
paul at anastrophe.com
Sat Jun 30 06:57:41 UTC 2018
On 6/29/2018 23:19 PM, Gary E. Miller wrote:
> Everything runs quite lovely, notwithstanding temperature variations,
>> which I'm working on smoothing out.
> I dealt with that in two ways.
> First added a TEMPer thermometer to the RasPi. Then had the RasPi turn
> on and off a 12V light bulb in the box with the Raspi.
> But I still had frequency variations on CPU load changes.
> Second, I added a CPU job that would vary computations to keep the CPU
> temerature stable. I don't care so much about the CPU temp, but the
> XTAL is on the backside of the PCB from the CPU. Thos two flattend out
> the frequency variations.
Right - I am using the ntpheat application to smooth the overnight temps
up closer to daytime temps, I have a thin, closed-cell insulation sheet
affixed to the back of the GPS hat to slow temp variations coming from
the Raspi itself, and just today I acquired a simple container that I
should be able to use to buffer ambient temperatures even more - that's
a work in progress. Also as I mentioned, offloading the ntpviz
processing onto a separate pi significantly smoothed out the overall
I've considered getting one of the adafruit temperature sensor boards
and modding that onto the gps hat - then using the signal from that to
operate a server to gradually adjust how far open the cover is on the
container - but that's a work not in progress yet, as it'll demand a lot
of study to get it all working, if I even figure out how.
> *Except* that at regular intervals, there is a spike in clock offset,
>> followed a smaller interval by another spike in offset.
> Interesting graphs. You seem to have eliminated all my guesses already.
Yeah, I've been going over this this asses to elbows for a couple of
weeks - having begun seeing all these variations thanks to ntpviz.
> I briefly latched onto this -
>> http://www.ntp.org/ntpfaq/NTP-s-trbl-spec.htm - based on my earlier
>> timings of eleven minutes, as the example within 126.96.36.199.2 suggested
>> an eleven minute interval for RTC updates - but these later timings
>> dash that.
> Do you have an RTC on your RasPi? That is not standard.
I didn't explain that fully. I was thinking that somehow the kernel
thought there was a realtime clock because the GPS hat has a realtime
clock, and that somehow it was trying to set the RTC, but because it
couldn't it was going all fubar. But the hat's RTC is internal to the
MT3339 chip and not even wired through the board GPIO - I don't believe
there's any way the kernel could even know about it. It was one of those
severe-longshot-but-omg-eleven-minutes-maybe-i've-found-it kind of moments.
> Otherwise I go nothing... Good luck with it.
Thanks Gary. It's severely puzzling. I may never find an answer but it's
fun trying, and it's a fabulous learning experience.
More information about the users