High CPU utilization of inactive Windows virtual machines
search cancel

High CPU utilization of inactive Windows virtual machines

book

Article ID: 344029

calendar_today

Updated On:

Products

VMware VMware Desktop Hypervisor VMware vSphere ESXi

Issue/Introduction

Servers utilization is high when Windows virtual machine is inactive.

Environment

VMware Player 5.x (Linux)
VMware Fusion 3.x
VMware ESX Server 3.0.x
VMware Workstation 4.x (Windows)
VMware Player 7.x (Windows)
VMware Player 6.x (Linux)
VMware Workstation 10.x (Windows)
VMware Workstation 6.x (Windows)
VMware Workstation 9.x (Linux)
VMware Workstation 5.x (Linux)
VMware Workstation 8.x (Windows)
VMware Fusion 5.x
VMware Workstation 4.x (Linux)
VMware Workstation 11.x (for Linux)
VMware Workstation 7.x (Linux)
VMware Workstation 5.x (Windows)
VMware Player Pro 7.x (Linux)
VMware ESX Server 2.0.x
VMware Player 3.x (Linux)
VMware ESX Server 3.5.x
VMware Fusion 4.x
VMware ESX Server 2.1.x
VMware Workstation 10.x (Linux)
VMware Fusion 2.x
VMware Fusion 6.x
VMware ESXi 4.0.x Installable
VMware ESX Server 1.5.x
VMware Player Pro 7.x (Windows)
VMware ESX 4.0.x
VMware Player 6.x (Windows)
VMware vSphere ESXi 5.0
VMware GSX Server 2.x (Windows)
VMware Workstation 9.x (Windows)
VMware GSX Server 3.x (Windows)
VMware Workstation 8.x (Linux)
VMware Player 4.x (Windows)
VMware Fusion 1.x
VMware ESXi 4.0.x Embedded
VMware Fusion 7.x
VMware ESX Server 2.5.x
VMware Player 4.x (Linux)
VMware Player 5.x (Windows)
VMware Workstation 6.x (Linux)
VMware ACE 1.0.x
VMware Workstation 7.x (Windows)
VMware GSX Server 3.x (Linux)
VMware GSX Server 2.x (Linux)
VMware Workstation 11.x (for Windows)
VMware Player 3.x (Windows )
VMware Player 7.x (Linux)

Resolution

When a physical or virtual machine is idle, its operating system either issues a halt instruction or repeatedly executes an idle loop.
  • When an idle virtual machine executes a halt, it stops processing all instructions and requires no cycles on the server's physical CPU. This is an expected behavior in a virtual machine and causes no performance problems.
  • When an idle virtual machine executes its idle loop, it is actively executing instructions which run on the underlying physical processor. In this case, performance tools in the guest operating system show an inactive operating system, but the CPU on the server is fully utilized.

Idle loop behavior occurs most often when you try to add virtual processors to a virtual machine. For more information, see the CPU Virtual Machine Configuration section of the vSphere Virtual Machine Administration Guide.

For a virtual machine running a Windows operating system, having the incorrect HAL (Hardware Abstraction Layer) installed makes the guest operating system always spin in its idle loop instead of halting. A virtual machine with two or more vCPUs configured should be running with a Multiprocessor or SMP HAL. A virtual machine with one vCPU configured should be running with a Uniprocessor HAL.

To determine which HAL your virtual machine is using and if you are running with the correct vCPU count for the HAL :

Note: Windows Server 2008 and later detected that HAL is at boot time and does not require changes.

  1. Right-click My Computer icon, and click Properties.
  2. Click the Hardware tab.
  3. Click the Device Manager tab.
  4. Double-click the Computer icon to see the HAL that is currently loaded.
  5. In the vSphere or VMware Infrastructure client, click the virtual machine and, then click the Summary tab to see how may vCPUs are configured.

Your configuration is correct if:

  • You have one vCPU and your virtual machine operating system is configured for a Uniprocessor ACPI.
  • Your virtual machine operating system is configured for two or more vCPUs and is running with a Multiprocessor ACPI.
Note: Downgrading the HAL from multiprocessor to uniprocessor is not supported by Microsoft in Windows Server 2003 and it is not supported by VMware. For more information, see Cannot Select MPS Uniprocessor or ACPI Uniprocessor HAL.
You can add processors to a virtual machine that were created under ESX 2.x or higher and Workstation 5.5 or higher, but you must update the Windows HAL in your guest operating system. This is true if you are running a Windows 2000 guest operating system.
For more information on adding processors in:

Note: When the correct HAL is installed, some guest operating systems halt more aggressively than others. When the system is inactive, some guest operating systems may spin in their idle loop for some time before issuing a halt instruction, whereas others may halt immediately. Typically, operating systems that spin in idle loops before halting are running with multiple processors.

For additional information about HAL, see Windows Virtual Machines with Latency-Sensitive I/O Workloads Can Slow Down in Four-Way SMP Configurations (2231) and the Microsoft Knowledge Base articles 309283 and 237556.

Note: The preceding links were correct as of August 25, 2015. If you find a link to be broken, provide feedback on the article and a VMware employee will update the article as necessary.

Additional Information

For translated versions of this article, see: