Installation guide
C H A P T E R 1 2 VMware ESX Server Resource Management
407
The MemIdleTax configuration option provides explicit control over the policy for
reclaiming idle memory. You may use this option, together with the
MemSamplePeriod configuration option, to control how the system reclaims
memory. However, in most cases, changes shouldn’t be necessary. For complete
information on using these options, see Service Console Commands on page 412.
ESX Server estimates the working set for a virtual machine automatically by
monitoring memory activity over successive periods of virtual machine virtual 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 has been
reclaimed is be able to ramp up quickly to its full share-based allocation once it starts
using its memory more actively. You can modify the default monitoring period of 30
seconds by adjusting the MemSamplePeriod configuration option.
Reclaiming Memory from Virtual Machines
ESX Server employs two distinct techniques for dynamically expanding or contracting
the amount of memory allocated to virtual machines — a VMware-supplied
vmmemctl module that is loaded into the guest operating system running in a
virtual machine, and swapping pages from a virtual machine to a server swap file
without any involvement by the guest operating system.
The preferred mechanism is the vmmemctl driver, which cooperates with the server
to reclaim those pages that are considered least valuable by the guest operating
system. The vmmemctl driver uses a proprietary “ballooning” technique, that
provides predictable performance which closely matches the behavior of a native
system under similar memory constraints. It effectively increases or decreases
memory pressure on the guest operating system, causing the guest to invoke its own
native memory management algorithms. When memory is tight, the guest operating
system decides which particular pages to reclaim and, if necessary, swaps them to its
own virtual disk. The guest operating system must be configured with sufficient swap
space. Some guest operating systems have additional limitations. See the notes in
Managing Memory Resources from the Service Console on page 411 for details. If
necessary, you can limit the amount of memory reclaimed using vmmemctl by
setting the sched.mem.maxmemctl option. This option specifies the maximum
amount of memory that may be reclaimed from a virtual machine in megabytes (MB).
Swapping is used to forcibly reclaim memory from a virtual machine when no
vmmemctl driver is available. This may be the case if the vmmemctl driver was
never installed, has been explicitly disabled, is not running (for example, while the
guest operating system is booting) or is temporarily unable to reclaim memory