Xen HVM guest has severe clock drift

domuntpvirtualizationxen

I am seeing a very severe clock drift on my Xen HVM VPS, rented from a hosting provider, so I don't have access to the dom0 system. I continuously run ntpd, but the clock drifts by as much as 30 seconds in 5 minutes and NTP cannot keep up. Has anyone experienced this?

Here are some details:

$ dmesg | grep clock
[    0.160000] Measured 347 cycles TSC warp between CPUs, turning off TSC clock.
[    0.396000] * this clock source is slow. Consider trying other clock sources
[    0.550448] Switching to clocksource acpi_pm
[    0.653135] rtc_cmos 00:05: setting system clock to 2011-03-09
02:45:40 UTC (1299638740)

$ cat /sys/devices/system/clocksource/clocksource0/available_clocksource 
acpi_pm

$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource 
acpi_pm

Best Answer

Add this line to the beginning of ntpd.conf:

tinker panic 0

That will help it keep up. Here is a link to the vmware best practices for timekeeping. I know you're not using vmware, but much of it should still be applicable.