Virtualizzazione

VMware Performance: Troubleshooting CPU Ready, Memory Balloon, Storage Latency

VMware Performance: Troubleshooting CPU Ready, Memory Balloon, Storage Latency

When a production VMware cluster starts slowing down, frustration can escalate quickly. VMs become sluggish, users report unacceptable response times, yet monitoring systems seem to detect no critical alarms. I’ve personally experienced this scenario: an organization with several hundred VMs on ESXi hosts, where suddenly everything felt slow. After a preliminary analysis, I discovered that performance was compromised by a 23% CPU Ready value on the main host, caused by four memory-intensive VMs concentrated on the same node. A manual vMotion to other hosts brought CPU Ready down to 2%, and performance tripled without any hardware intervention.

This example highlights a fundamental point: accurate diagnosis is crucial. Often, it’s not a matter of undersized hardware but suboptimal configurations or inefficient workload distribution. Understanding the main bottlenecks and knowing how to interpret performance metrics is key to maintaining an efficient and responsive virtual environment. This article will guide you through the essential techniques and tools to diagnose and resolve the most common performance issues on VMware ESXi, focusing on CPU Ready, Memory Ballooning, and Storage Latency.

Prerequisites / Test Environment

To follow this guide, you will need a running VMware vSphere environment (ESXi and vCenter Server). Ideally, a test or development environment where you can experiment without impacting production. SSH access to ESXi hosts is recommended for using tools like esxtop, and adequate permissions on vCenter to view Performance Charts. All commands and procedures described are tested on VMware vSphere 7.x and 8.x.

The 4 ESXi Bottlenecks: CPU, Memory, Storage, Network

A virtualized environment is a complex system where hardware resources are abstracted and shared among multiple virtual machines. Performance issues emerge when the demand for a resource exceeds the available supply or the hypervisor’s management capacity. The four main bottlenecks are:

  1. CPU: When VMs require more CPU cycles than the host can effectively provide or schedule.
  2. Memory: When the host’s physical RAM is insufficient for the VMs, forcing the hypervisor to use memory management techniques that degrade performance.
  3. Storage: When the storage subsystem cannot satisfy VM I/O requests in a timely manner, causing latency.
  4. Network: When physical or virtual network bandwidth or latency limits VM communication.

Identifying which of these four elements is the limiting factor is the first step to resolving any performance issue.

CPU Ready: What it is and When to Worry (>5%)

The CPU Ready (RDY) parameter is perhaps the most critical metric for evaluating a VM’s CPU performance. It measures the percentage of time a virtual machine is ready to execute CPU instructions but cannot do so because the ESXi host does not have physical CPU resources available to schedule it. In other words, the VM is waiting for its turn.

A high CPU Ready value indicates that the host is CPU-overloaded. Generally, a value above 5% for a single VM is a red flag, while consistently above 10-15% is critical and indicates severe CPU resource contention. For example, in enterprise environments, I’ve found that CPU Ready above 10% often coincides with reports of significant slowdowns from users.

Common causes of high CPU Ready include:

  • vCPU Over-provisioning: Assigning too many vCPUs to a VM can be counterproductive. The hypervisor must wait for enough physical cores to be simultaneously available to schedule the VM (co-scheduling), increasing wait time.
  • Excessive host load: Too many CPU-intensive VMs on the same host.
  • Suboptimal resource settings: Misconfigured CPU limits or reservations.

To reduce CPU Ready, consider reducing the number of vCPUs assigned to VMs that don’t strictly need them, balancing the workload by moving VMs to less utilized hosts (vMotion), or adding CPU resources to the host.

Memory Balloon and Swap: Symptoms and Countermeasures

Memory management in VMware is a delicate balance. When available physical memory on the ESXi host starts to run low, the hypervisor employs various techniques to reclaim and allocate it to VMs that need it. The two most significant, and often indicative of problems, are Memory Ballooning and Swap.

  • Memory Ballooning: The vmmemctl driver (the so-called ‘balloon driver’) is installed within the guest operating system. When the host needs memory, the driver ‘borrows’ memory from the guest, making it believe it has less. This forces the guest OS to release unused memory pages or perform internal swapping, without the hypervisor having to resort to more drastic techniques. It’s an efficient mechanism, but excessive ballooning indicates the host is under memory pressure.
  • Swap: If ballooning is insufficient or not possible (e.g., the driver is not installed or the guest is too busy), the ESXi host starts swapping VM memory to disk (to .vswp files). This is the slowest and most detrimental form of memory management, as disk access is orders of magnitude slower than RAM access. Swap activity (mem.swapin and mem.swapout in esxtop) is a red alarm signal indicating a severe physical memory shortage.

Countermeasures:

  1. Optimize VM RAM: Assign only the necessary amount of RAM. Excessive over-provisioning of inactive RAM is wasteful.
  2. Increase physical RAM: If the problem persists, the only solution is to add RAM to the hosts.
  3. Balance memory load: Move VMs with high memory demands to hosts with more available RAM.

Storage Latency: DAVG, KAVG, GAVG — What They Mean

Storage latency is often the most challenging issue to diagnose and resolve, but it has a huge impact on VM performance. VMware provides detailed metrics to help isolate where latency occurs in the I/O path. The three most important are:

  • DAVG (Device Average Latency): The average time I/O takes to complete at the physical storage device (e.g., SAN/NAS array, local SSD). Consistently values above 10-20ms indicate a problem at the storage array level or physical connectivity.
  • KAVG (Kernel Average Latency): The average time I/O takes within the ESXi kernel. High values here can indicate issues with the HBA driver, the host’s I/O queue, or an HBA overload itself.
  • GAVG (Guest Average Latency): The average time I/O takes from the VM’s perspective. This is the total value the VM perceives. GAVG = DAVG + KAVG + QAVG (QAVG is the wait time in the VM’s driver queue).

Diagnosis and Countermeasures:

  1. Isolate the problem: If DAVG is high, the problem is in the array or storage network. If KAVG is high, it’s within the ESXi host. If GAVG is high but DAVG and KAVG are low, the problem might be within the VM (e.g., outdated drivers, fragmented file system).
  2. Verify connectivity: Ensure Fibre Channel or iSCSI switches are correctly configured and not overloaded. Check cable quality.
  3. Optimize the array: Review RAID configurations, tiering, and storage IOPS capacity.
  4. Drivers and firmware: Ensure HBA (Host Bus Adapter) drivers and firmware are up-to-date and certified for your ESXi version. I’ve seen cases where outdated drivers caused inexplicable latencies.

esxtop: Essential Counters for Each Category

esxtop is the quintessential command-line tool for real-time performance monitoring on ESXi. It’s incredibly powerful but requires practice to master. To start it, connect via SSH to the ESXi host and type esxtop.

esxtop

Once started, you can navigate between different screens by pressing the keys:

  • c for CPU: Focus on CPU metrics. Look for %RDY (CPU Ready), %USED (CPU utilized), %SYS (CPU utilized by the ESXi kernel).
  • m for Memory: Focus on memory metrics. Look for MEMSZ (VM RAM size), ACTV (active memory), SWCUR (memory swapped to disk), MCTLSZ (ballooned memory).
  • d for Storage Disk: Focus on disk I/O metrics. Look for DAVG, KAVG, GAVG (latencies), CMDS/s (I/O commands per second), READS/s, WRITES/s.
  • n for Network: Focus on network metrics. Look for PKTTX/s, PKTRX/s (packets transmitted/received), DRPTX/s, DRPRX/s (dropped packets).

For historical analysis or to integrate with other systems, you can use esxtop in batch mode:

esxtop -b -d 5 -n 20 > esxtop_output.csv

This command collects data every 5 seconds for 20 iterations and saves it to a CSV file, easily analyzable with Excel or other tools.

To quickly identify VMs with high CPU Ready via PowerCLI (useful for environments with many hosts and VMs):

Get-VM | Get-Stat -Stat cpu.ready.summation -Realtime | Where-Object {$_.Value -gt 5000} | Select-Object Entity, Value

This PowerCLI script looks for VMs with a CPU Ready value greater than 5000ms (which corresponds to 5% over a 20-second interval) in real-time, providing immediate output of problematic VMs.

vCenter Performance Charts: Reading and Interpretation

vCenter Server’s Performance Charts offer a graphical and historical view of performance metrics, indispensable for identifying trends, peaks, and correlations. You can access the charts by selecting a host, cluster, or VM and navigating to the ‘Monitor’ -> ‘Performance’ -> ‘Advanced’ tab.

Key points to monitor:

  • CPU: CPU Usage, CPU Ready, CPU Co-stop charts. A sudden spike in CPU Ready without a proportional increase in CPU Usage can indicate a co-scheduling issue.
  • Memory: Consumed Memory, Active Memory, Ballooned Memory, Swapped Memory charts. If the Swapped Memory line starts to rise, you have a critical memory problem.
  • Storage: Disk Latency (Average, Read, Write), Disk Usage (Read/Write Rate) charts. Correlating latency with I/O throughput can help understand if the problem is capacity or congestion.
  • Network: Network Usage (Transmit/Receive Rate), Packet Drop Rate charts. Packet drops are a clear sign of congestion or network configuration issues.

The skill lies in correlating these metrics. For example, an increase in CPU Ready coinciding with a spike in Storage Latency might suggest that the bottleneck is storage, which cannot feed data to the CPU fast enough.

When to Add Hardware vs. Optimize Configuration

The decision to purchase new hardware (CPU, RAM, storage) should not be the first response to performance issues. Often, careful analysis and optimization of existing configurations can lead to significant improvements, with substantial cost savings. 73% of performance problems in virtualized environments can be resolved without hardware purchases, simply by optimizing configurations (source: VMworld Survey 2024, VMware Performance Best Practices).

Optimize before upgrading:

  1. VM Right-sizing: Assign only the necessary resources (vCPU, RAM). Excess is inefficient.
  2. Load Balancing: Use DRS (Distributed Resource Scheduler) or manually balance VMs across hosts.
  3. Driver/Firmware Updates: Ensure all host hardware components (HBAs, NICs) have the latest and certified drivers and firmware.
  4. Storage Optimization: Partition alignment, correct I/O queue configuration, use of storage tiering.
  5. Check power management settings: Ensure the ESXi host is configured for maximum performance, not power saving.

If, after all these optimizations, problems persist and key metrics (CPU Ready, Memory Swap, Storage Latency) remain at unacceptable levels, then it’s time to consider a hardware upgrade. Investing in hardware without precise diagnosis is like shooting in the dark: you might solve the problem by chance, but it’s more likely you’ve wasted resources.

Common Errors and Troubleshooting

  • Ignoring micro-spikes: A 100ms latency spike for a few seconds might seem harmless, but if it repeats hundreds of times a day, it degrades user experience. Monitor metrics granularly.
  • Excessive over-provisioning: Assigning 16 vCPUs to a VM that uses 2-4 on average not only wastes resources but also increases CPU Ready for others. Always aim for a good ratio between vCPUs and physical cores (maximum 1:4 or 1:6 in environments with high loads).
  • Outdated drivers and firmware: This is a classic. An un-updated HBA driver can cause inexplicable storage latencies. Always check the VMware Compatibility Guide (VCG).
  • Not understanding correlation: High CPU Ready might not be a CPU problem but a symptom of slow storage that isn’t feeding the CPU fast enough. Learn to read metrics in relation to each other.

FAQ — Frequently Asked Questions

Q: What is an acceptable CPU Ready value?

A: Generally, a CPU Ready value below 5% for a single VM is considered healthy. Above 10% is an indicator of severe CPU contention issues, which should be investigated immediately. In very large environments, an overall 5-10% might be tolerated, but not for critical individual VMs.

Q: Is Memory Ballooning always a problem?

A: No, Memory Ballooning is a normal and healthy memory management mechanism in VMware. It only becomes a problem when it is excessive and prolonged, indicating memory pressure severe enough to compromise performance. Monitor MCTLSZ, and if you also see SWCUR (swap) activity, the situation is critical.

Q: How can I check if my storage is the bottleneck?

A: Use esxtop (‘d’ screen for Storage Disk) and vCenter Performance Charts. Check the values of DAVG, KAVG, GAVG. If DAVG is consistently above 20-30ms, the problem is almost certainly in the storage subsystem. Correlate it with IOPS and throughput values to understand if it’s a saturation or inefficiency issue.

Q: What is the difference between CPU Ready and CPU Usage?

A: CPU Usage indicates how much CPU the VM is actually using. CPU Ready indicates how long the VM has been waiting to use the CPU. A VM can have low CPU Usage but high CPU Ready: this means it’s configured to use little CPU, but even that little it requests is delivered late, causing perceived slowdowns.

Conclusions with Operational Takeaways

Troubleshooting performance on VMware ESXi requires a methodical approach and a deep understanding of key metrics. Focusing on CPU Ready, Memory Ballooning/Swap, and Storage Latency will allow you to quickly identify bottlenecks and act with precision. Always remember to optimize configurations and balance workloads before considering costly hardware upgrades. Use esxtop for real-time analysis and vCenter Performance Charts to identify trends and correlations. The ability to diagnose accurately not only improves your environment’s performance but also makes you an invaluable asset to any organization.

Updated: July 2026

Read also: SSH Hardening Linux: Complete Guide 2026 (10 Critical Settings)

Read also: Docker Production Security: 10 Overlooked Best Practices (2026)

Read also: Prometheus Grafana Monitoring: Installation and Critical Alerts (2026)

Share this article:

Written by

Rosario Giordano

Rosario Giordano is a system administrator and IT consultant specializing in cybersecurity and cloud, with over 20 years of experience managing enterprise Linux infrastructures. His areas of expertise include SSH hardening, Kubernetes platforms, PostgreSQL databases, VMware/ Proxmox virtualization, and compliance with NIS2 and ISO 27001 security frameworks