I have a unRAID 6.6.5 server with perfectly correct time and multiple Linux VMs which used to be perfectly synced too. I rebooted one of my VM and suddenly the clock goes twice as fast as the hwclock. I can easily see that by doing these 2 loops in 2 different terminals:
while true; do date; sleep 1; done;
while true; do hwclock --show; sleep 1; done;
If that matters, the hardware behind the unRAID server is an Intel Xeon E3-1245 V6 on a E3C236D2I with ECC RAM. Also, all my VMs are currently running CentOS 7. By default, CentOS 7 comes with chronyd installed. Doing either of these 2 commands will sync the clock, but since the clock goes twice as fast anyway, it's immediately out of sync after:
hwclock --localtime --hctosys
chronyc makestep
I have also tried using ntpd. The result is exactly the same, I can force the sync but the clock still goes too fast. Also, all my VMs are configured the same:
[root@vm ~]# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc acpi_pm
[root@vm ~]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
tsc
I have also tried switching to acpi_pm in the past without seeing any improvement. The unRAID server also runs with TSC:
root@server:~# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
tsc
root@server:~# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc hpet acpi_pm
What am I missing? I've done extensive research on the matter and haven't found a single solution to be working yet.
While your system is running, the hardware clock is not used. The system clock maintained by the kernel is the only one which matters. The kernel will sync the hardware clock to the system time automatically every 11 minutes anyway, but that's just to deal with the possibility of a clean shutdown not happening.
The questions to ask are:
date
andchronyc -n tracking
show the correct time, and doeschronyc -n sources
show your system keeping reasonably close with its sources?)If the answers to those questions are yes, then your system is doing the right thing. Ignore the hardware clock while your system is running.