Solved: VMware High CPU Usage (Causes and Solutions)
Due to different reasons, VMware high CPU usage will impact virtual machine performance. So, in order to reduce CPU usage in VMware or utilize CPU resource more properly, you could refer the solutions in this article.
Case: Consistently high CPU usage in my VMware
Recently, when I was running my virtual machines, I found that the CPU usage of the host is very high, I am not sure if it is just a system problem, the CPU usage of the virtual machine is over 90%, and the CPU ready value is over 20%. I was hoping to get some advice on the consistently high CPU usage in VMware. What should I do?
Such a situation in frequently seen in practice, but how exactly do we solve it? In the following article, I will analyze the possible causes of VMware high CPU usage and provide some suggestions worth trying.
Why does VMware use high CPU usage (possible causes)
To check CPU usage, you can press Ctrl + Alt + Delete, and then click Task Manager. A short spike in CPU usage or CPU ready means that you are making the best use of the virtual machine resources. However, in some cases, consistent VMware high CPU usage will impact the virtual machine performance, which may be caused by the following’s reasons.
- The host probably lacks the CPU resources needed to meet the requirements.
- There might be too many virtual CPUs relative to the number of physical processor cores.
- There might be an IO storage or networking operation that places the CPU in a wait state.
- The Guest OS generates too much load for the CPU.
In order to limit CPU usage in the VMware, you can consider performing the methods in the next part.
Solutions to reduce VMware high CPU usage (9 tips)
How to reduce CPU usage in VMware? Since the causes of high CPU usage are diverse, it is hard to say which method will be decisive for your VMware. Here I will list some proven methods that you can try them one by one:
1. Upgrade the VMware Tools installed on every virtual machine on the host.
2. Compare the CPU usage value of a virtual machine with the CPU usage of other virtual machines on the host or in the resource pool. The stacked bar chart on the host's Virtual Machine view shows the CPU usage for all virtual machines on the host.
3. Determine whether the high ready time for the virtual machine resulted from its CPU usage time reaching the CPU limit setting. If so, increase the CPU limit on the virtual machine.
4. Increase the CPU shares to give the virtual machine more opportunities to run. The total ready time on the host might remain at the same level if the host system is constrained by CPU. If the host ready time does not decrease, set the CPU reservations for high-priority virtual machines to guarantee that they receive the required CPU cycles.
5. Increase the amount of memory allocated to the virtual machine. This can potentially decrease disk and/or network activity for applications that cache. This might lower disk I/O and/or network traffic, which could in turn reduce CPU utilization. Virtual machines with smaller resource allocations generally accumulate more CPU ready time.
6. Reduce the number of virtual CPUs on a virtual machine to only the number required to execute the workload. For example, a single-threaded application on a four-way virtual machine only benefits from a single vCPU. But the ESXi's maintenance of the three idle vCPUs takes CPU cycles that could be used for other work.
7. If the host is not already in a DRS cluster, add it to one. If the host is in a DRS cluster, increase the number of hosts and migrate one or more virtual machines onto the new host.
8. Upgrade the physical CPUs on the host if necessary.
9. Use the newest version of hypervisor software, and enable CPU-saving features such as TCP Segmentation Offload, large memory pages, and jumbo frames.
Using above methods, you can effectively reduce CPU usage in VMware and thus improve the performance of virtual machines.
Suggestion: Allocate vCPU to VMs reasonably
The exact amount of CPU overcommitment a VMware host can accommodate will depend on the VMs and the applications they are running. However, you can estimate the available host CPU resources, and then allocate vCPU to VMs in a more reasonable way.
Calculate the number of physical cores (pCPU) available on a host:
Physical Processors (pCPU) = (Processor Sockets) X (Cores/Processor)
If the cores use hyperthreading, calculate the number of logical cores:
Virtual Processors (vCPU) = (pCPU) X (2 threads/physical processor)
It’s better to assign a vCPU per VM as required than adding too many unneeded vCPU to VMs at once. Allocate vCPUs appropriately to increase the resource availability for other VMs and reduce CPU ready time.
In production environment, if VMware use so much CPU, virtual machines are possible to be stuck in running, which is highly to cause data loss of VMware VM. So regular VMware backup is critical to protect data from security threats.
Important: always protect VMware VMs from data threats
To avoid data loss due to virtual machine lag, it is recommended that you perform virtual machine backups, especially for important business data.
AOMEI Cyber Backup, a free backup tool, is designed to offer a reliable VMware and Hyper-V backup solution. It can constantly protect VMware virtual machines by automating VM backups and restoring VM easily and quickly. With this efficient backup software, you can enjoy:
Support Free ESXi: support both paid and free versions of VMware ESXi.
Perpetual Free: no time limit for AOMEI Cyber Backup Free Edition.
Backup multiple VMs at once: Select multiple VMs to back up simultaneously without any interruption.
Fast restore from any point: Restore a VM to the original or another datastore/host with simple clicks.
Role-Assignment: allow one administrator to create sub-accounts with limited privilege, effectively reduce administration cost and manual errors.
Please download and install the free agentless backup software to proceed:
*You can choose to install this VM backup software on either Windows or Linux system.
How to protect VMware from data loss with free backup software
1. Download AOMEI Cyber Backup and enter the required information to add devices. You don’t need to install any agent or perform complex configuration.
2. Click Backup Task >> Create New Task.
3. In the open window, configure the following settings to create VMWare VMs backup which can be restored to another datastore easily.
✦ Enter a task name and choose one or more virtual machines for backup.
✦ Set up Backup Schedule. You can set up the backup task once or schedule a daily/weekly/monthly task. Combine full backup, incremental or differential backup according to your need, which is extremely convenient and reduces your workload directly.
✦ Click Start Backup: you can choose to add the scheduled backup and run it immediately, or only add the task and run it later.
4. After creating VM backups, you can easily hit Restore to recover a virtual machine from any selected history version.
✦ Select the VM backup and choose Restore to original location.
✦ Specify the target host and datastore as you want.
✍ While the Free Edition covers most of the VM backup needs, you can also upgrade to Premium Edition to enjoy:
✦ Batch VM Backup: Batch backup large numbers of VMs managed by vCenter Server or standalone ESXi hosts.
✦ Backup Cleanup: Configure retention policy to auto delete the old backup files and save storage space.
✦ Restore to new location: Easily make a clone of a virtual machine in the same or another datastore/host, without reinstalling or configuring a new VM.
If you notice your VMware high CPU usage, remember to backup virtual machines and regard it as a work routine. Besides, VMware backup solution also ensures data security when plan to make big changes of virtual machine.
In this article, we have discussed the reasons of VMware high CPU usage and how to reduce CPU usage in VMware. Using CPU resources properly can improve the utilization of virtual resources, otherwise high CPU usage in VMware may affect the performance of the virtual machine and cause data loss.