Repeating keys under Fedora and Red Hat Enterprise Linux

I recently ran into a case where I was seeing rapidly repeating keys under a Red Hat Enterprise Linux virtual machine.  I was also contact by one of the virtual machine MVPs who was seeing the same problem under Fedora.

After a bit of poking around it turned out that this was an extreme case of KB918461 ( “The system time runs too fast on a Linux-based virtual machine that is hosted in Virtual Server 2005 R2”.

What is happening here is that the 2.6 kernel is using the TSC (time stamp counter) to provide a higher level of accuracy for time over just using the PIT (programmable interrupt timer).  The problem is that the TSC is highly unreliable inside of a virtual machine – and this results in all sorts of timing oddities.

The resolution proposed by this KB is to configure Linux to just use the PIT for timing – which solved my problem nicely.