Page 1 of 1

SUMMARY: a single idle VM chewing up CPU, fixed

PostPosted: 29. Oct 2010, 12:49
by jimklimov
On one site we have a Solaris 10 system, which hosts a 1-CPU Linux VM under VirtualBox 3.0.12 in a local zone. This VM often does nothing inside, but the VM process ate about 80% of a CPU core. Note that a copy of this same setup with on our hardware behaves properly.

We tried to fix this by CPU affinity to reduce context switching, as some other posts suggested (made a processor pool of one core and dedicated it to this local zone), but this did not help noticeably.

Then I stumbled upon this post, which suggested a simple fix by adding a dummy VM: ... ment-21289

Thanks to the original poster. As others said, this seems crazy but has worked indeed!

Adding a DOS VM with the minimal 4Gb RAM, 1Gb Video RAM and no boot devices at all has helped us indeed.

The two VMs now consume under 0.1% CPU each, while idle, as expected.

Hope this info helps others,
//Jim Klimov

UPDATE 2010-11-17: I missed the other CPU affinity possibility back then. Instead of creating a CPU pool dedicated to the VM or local zone, it is possible to bind a specific process ID to a specific vCPU, and still allow other programs to use that vCPU as needed - see pbind(1M) command. However unlike Linux "taskset" or Windows "start /AFFINITY", the Solaris "pbind" is limited to binding a process to ONE vCPU and not to a subset of several vCPUs. For the task at hand - to eliminate VBox process context switching - this is quite acceptable.