Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted
+50

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.

share|improve this answer
    
If you want to be 100% safe (or as close to it as you can with a relatively new OS), set FreeBSD 9 to use the standard "ticking" kernel (kern.eventtimer.periodic = 1) and set kern.hz as you would under previous versions. With a tickless kernel kern.hz should have no effect. –  voretaq7 Sep 28 '12 at 14:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.