I'm running a FreeBSD 9.0 setup as a virtual machine in a KVM setup. In previous versions of FreeBSD it was common to force the kern.hz
setting to a lower value so that the virtual machine does not keep the host busy because it's handling timer interrupts without having any work to do - the FreeBSD Handbook explains:
The most important step is to reduce the kern.hz tunable to reduce the CPU utilization of FreeBSD under the Parallels environment. This is accomplished by adding the following line to
/boot/loader.conf: kern.hz=100
Without this setting, an idle FreeBSD Parallels guest OS will use roughly 15% of the CPU of a single processor iMac®. After this change the usage will be closer to a mere 5%.
However, in FreeBSD 9, the "dynamic tick mode" (aka "tickless mode") is the default, controlled by the kern.eventtimer.periodic
setting which defaults to 0
(read: tickless mode).
This makes me wonder - does the tip of lowering kern.hz
still have any relevance for making FreeBSD 9 play nicely in a virtual machine setup?
While theoretically it should not be needed, according to this Post on FreeBSD-Stable mailing list there seem to be problems using tickless VMs over longer periods of time on on VMware ESX 5.0 - which may or may not happen on KVM.