]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Default HZ value (1,000) on i386/amd64 is not very virtual machine friendly.
authorMaxim Sobolev <sobomax@FreeBSD.org>
Mon, 27 Oct 2008 06:25:02 +0000 (06:25 +0000)
committerMaxim Sobolev <sobomax@FreeBSD.org>
Mon, 27 Oct 2008 06:25:02 +0000 (06:25 +0000)
commit7f03c419bc9bec268998c2d2154c0d133a8a6bbc
treeb15e493185ed0490d0a96ca598132e78d10afca8
parentdc9d16844c13cbe99ea9cdd0057b048e5b5a68bf
Default HZ value (1,000) on i386/amd64 is not very virtual machine friendly.
Due to the nature of the beast it causes lot of unproductive overhead. This
is especially bad when running SMP kernel on VMWare with several virtual
processors - idle FreeBSD guest with SMP kernel takes 150% host CPU time on my
dual-core MacBook Pro when I am enabling two virtual CPUs, making even host
not very usable. Detect when we are running in the sandbox and reduce HZ
to 10 (can be adjusted via VM_HZ in the kernel config) in such cases. This
brings host CPU usage of idle FreeBSD/SMP on two virtual processors down
to 10%.

Detect most popular VM platforms out there - VMWare, Parallels, VirtualBox
and VirtualPC.

MFC after: 2 weeks
sys/kern/subr_param.c