Virtual Machine memory spikes and is receiving less memory than configured despite available host resources
search cancel

Virtual Machine memory spikes and is receiving less memory than configured despite available host resources

book

Article ID: 396019

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Virtual machines may experience performance degradation when the ESXi host grants significantly less memory than configured. As an example, a VM configured with 16GB of RAM may only receive approximately 3GB of memory from the ESXi hypervisor, despite the host having ample available memory (hundreds of GB free). This memory constraint can lead to application instability, performance issues, and unexpected memory spikes that aren't associated with activity within the guest operating system.

Environment

  • VMware vCenter Server 7.0 or later
  • VMware ESXi 7.0 or later
  • Virtual machines with memory allocations greater than 2GB

Cause

This issue occurs due to the absence of a memory reservation setting for the virtual machine. Without a reservation, ESXi dynamically allocates memory based on various factors including overall system demand, resulting in potential under-allocation even when physical memory is abundant. Contributing factors may include memory overprovisioning (exceeding 100%)

Resolution

To resolve the memory allocation issue:

Set a Memory Reservation for the affected virtual machine:

  1. In vCenter Server, power off the affected VM
  2. Right-click the VM and select Edit Settings
  3. Navigate to the Resources tab
  4. Select Memory in the left panel
  5. In the Reservation field, enter at least 50% of the VM's configured memory (e.g., 8192 MB for a 16GB VM)
  6. Click OK to save the changes
  7. Power on the VM

Additional Information

  • Memory reservations guarantee the specified amount of physical memory to the VM, but may reduce overall memory utilization efficiency
  • For VMs with critical applications, reservations of 50-100% of configured memory may be appropriate
  • Monitor performance after implementing memory reservations to ensure optimal balance
  • Understanding Memory Resource Management in VMware® ESX™ Server