Why does Linux clock keep running too fast or too slow in VMware?

I noticed this myself a few months ago but thought ntp needed to get in sync and stabilize and forgot about it until a new colleague alerted me to Linux kernel timing...
Since the ESX host runs at a certain clock tick rate (usually 1000 per second) and Linux guests (VMs) also run at that rate (if kernel >= 2.6.x), you get a mismatch between real and virtual clock ticks. So interrupts get missed, never happen or keep happening. Either way, time gets skewed and this can lead to serious issues.
VMware is aware of this issue and their Knowledge Base offers a few fixes and work-arounds for ESX 2, 2.5 and 3 (i.e. VI3). The basic thought is to increase the tick rate for the ESX host, or to limit the tick rate for the VM.

The new tick-less kernel may also provide a great solution, but support for this by Oracle or VMware is yet unknown.

No comments: