6.7

Table Of Contents
How ESXi Hosts Allocate Memory
A host allocates the memory specified by the Limit parameter to each virtual machine, unless memory is
overcommitted. ESXi never allocates more memory to a virtual machine than its specified physical
memory size.
For example, a 1GB virtual machine might have the default limit (unlimited) or a user-specified limit (for
example 2GB). In both cases, the ESXi host never allocates more than 1GB, the physical memory size
that was specified for it.
When memory is overcommitted, each virtual machine is allocated an amount of memory somewhere
between what is specified by Reservation and what is specified by Limit. The amount of memory
granted to a virtual machine above its reservation usually varies with the current memory load.
A host determines allocations for each virtual machine based on the number of shares allocated to it and
an estimate of its recent working set size.
n
Shares — ESXi hosts use a modified proportional-share memory allocation policy. Memory shares
entitle a virtual machine to a fraction of available physical memory.
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 setting. See Set Advanced Host
Attributes.
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 effective 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 attribute, to control how the system determines target memory allocations
for virtual machines. See Set Advanced Host Attributes.
Note In most cases, changes to Mem.IdleTax are not necessary nor appropriate.
vSphere Resource Management
VMware, Inc. 35