6.5.1

Table Of Contents
n
Working set size — ESXi hosts estimate the working set for a virtual machine by monitoring memory
activity over successive periods of virtual machine execution time. Estimates are smoothed over several
time periods using techniques that respond rapidly to increases in working set size and more slowly to
decreases in working set size.
This approach ensures that a virtual machine from which idle memory is reclaimed can ramp up
quickly to its full share-based allocation when it starts using its memory more actively.
Memory activity is monitored to estimate the working set sizes for a default period of 60 seconds. To
modify this default , adjust the Mem.SamplePeriod advanced seing. See “Set Advanced Host
Aributes,” on page 115.
Memory Tax for Idle Virtual Machines
If a virtual machine is not actively using all of its currently allocated memory, ESXi charges more for idle
memory than for memory that is in use. This is done to help prevent virtual machines from hoarding idle
memory.
The idle memory tax is applied in a progressive fashion. The eective tax rate increases as the ratio of idle
memory to active memory for the virtual machine rises. (In earlier versions of ESXi that did not support
hierarchical resource pools, all idle memory for a virtual machine was taxed equally.)
You can modify the idle memory tax rate with the Mem.IdleTax option. Use this option, together with the
Mem.SamplePeriod advanced aribute, to control how the system determines target memory allocations for
virtual machines. See “Set Advanced Host Aributes,” on page 115.
N In most cases, changes to Mem.IdleTax are not necessary nor appropriate.
VMX Swap Files
Virtual machine executable (VMX) swap les allow the host to greatly reduce the amount of overhead
memory reserved for the VMX process.
N VMX swap les are not related to the swap to host swap cache feature or to regular host-level swap
les.
ESXi reserves memory per virtual machine for a variety of purposes. Memory for the needs of certain
components, such as the virtual machine monitor (VMM) and virtual devices, is fully reserved when a
virtual machine is powered on. However, some of the overhead memory that is reserved for the VMX
process can be swapped. The VMX swap feature reduces the VMX memory reservation signicantly (for
example, from about 50MB or more per virtual machine to about 10MB per virtual machine). This allows the
remaining memory to be swapped out when host memory is overcommied, reducing overhead memory
reservation for each virtual machine.
The host creates VMX swap les automatically, provided there is sucient free disk space at the time a
virtual machine is powered on.
Memory Reclamation
ESXi hosts can reclaim memory from virtual machines.
A host allocates the amount of memory specied by a reservation directly to a virtual machine. Anything
beyond the reservation is allocated using the host’s physical resources or, when physical resources are not
available, handled using special techniques such as ballooning or swapping. Hosts can use two techniques
for dynamically expanding or contracting the amount of memory allocated to virtual machines.
n
ESXi systems use a memory balloon driver (vmmemctl), loaded into the guest operating system running
in a virtual machine. See “Memory Balloon Driver,” on page 36.
Chapter 6 Administering Memory Resources
VMware, Inc. 35