When the virtual machine requires a high-speed timer, the requirement is
usually met by /dev/rtc on the host. In some circumstances, /dev/rtc is
unavailable, leading to slowness in the guest.
The main symptom is that the virtual machine’s clock fails to keep time
properly. In addition, applications that are timed by the virtual machine’s
clock, such as Windows menu animations, may also run slowly. Applications that
don’t use the timer to delay their execution run at normal speed.
Note: Before deciding whether to attempt the workaround described below, be
sure to read the “Background” section at the end of this article. It contains
a more detailed description of the symptoms to help you decide whether the
workaround applies to the problem you are seeing.
The workaround has two parts: building a custom kernel for your Linux host so
it uses a higher timer interrupt rate, and adding a special setting to the
virtual machine’s configuration file.
Build a custom kernel.
See the documentation for your Linux distribution for detailed instructions on
how to build and run a custom kernel. There is one key change you must make
before building the custom kernel.
Locate the following line in /usr/src/linux-2.4/include/asm-i386/param.h:
#define HZ 100
Change the value of HZ to 1000:
#define HZ 1000
Note: For certain Red Hat Linux 7 and 8 kernels . including 2.4.18-18.7.x and
some later versions . the procedure for increasing the timer interrupt rate is
different. Do not edit the value of HZ in
/usr/src/linux-2.4/include/asm-i386/param.h. Instead, configure a new kernel
in the normal way (use either make config or make xconfig) and change the
value of CONFIG_HZ to 1024. If you use make xconfig, you can find the option
in the General setup menu. Then proceed to compile the kernel according to the
Red Hat instructions.
Note: The driver in /usr/src/linux-2.4/drivers/net/sk98lin (the driver for the
GEnesis PCI Gigabit Ethernet Adapter) does not compile with HZ set to anything
other than 100. Unless you need this driver, simply omit it when configuring
the kernel. If you do need this driver, see the section “Patch for sk98lin”
below.
Edit the virtual machine’s configuration file.
Open the configuration (.vmx or .cfg) file for the virtual machine in a text
editor and add the following line:
host.useFastclock = FALSE
Reboot the host using your custom kernel and launch the virtual machine; it
should run the application that requires a high-speed timer without causing
the virtual machine to run slowly.