NetBSD-Users archive

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

Re: NetBSD on Linode kvm problems

On Fri, 9 Feb 2018, Michael van Elst wrote: (Michael Parson) writes:

I then noticed that my clock was way off.  After about a week of
running, the clock was 4 days(!) behind, even with ntpd running.

ntpd won't correct a clock that appears to drift too fast.

This I knew.  I'm just wondering what is going on that is causing the
clock to drift so fast (slow?) that ntpd can't keep it current.

Can you check what timecounter is used and switch to a different one?

 sysctl kern.timecounter.choice

$ sysctl kern.timecounter.choice
kern.timecounter.choice = TSC(q=-100, f=2500159160 Hz)
clockinterrupt(q=0, f=100 Hz) piixpm0(q=1000, f=3579545 Hz)
hpet0(q=2000, f=100000000 Hz) ACPI-Safe(q=900, f=3579545 Hz)
lapic(q=-100, f=1000545361 Hz) i8254(q=100, f=1193182 Hz)
dummy(q=-1000000, f=1000000 Hz)

reports the available timers and

 sysctl -w kern.timecounter.hardware=clockinterrupt

configures a possibly sane default for virtual machines.

Ran this a couple of minutes ago:

$ sudo sysctl -w kern.timecounter.hardware=clockinterrupt
kern.timecounter.hardware: hpet0 -> clockinterrupt

And my clock is already 4 minutes off :-/

Michael Parson
Pflugerville, TX

Home | Main Index | Thread Index | Old Index