Installation guide
www.vmware.com
406
VMware ESX Server Administration Guide
Similarly, while memory reservations are used for admission control, actual memory
allocations vary dynamically, and unused reservations are not wasted.
The amount of swap space configured for the system limits the maximum level of
overcommitment. A default swap file size equal to the physical memory size of the
computer is recommended in order to support a reasonable 2x level of memory
overcommitment. You may configure larger or smaller swap files or add additional
swap files.
If you do not configure a swap file, memory may not be overcommitted. You may
configure the swap file using the VMware Management Interface (Swap
Configuration in the Options page) or from the service console using the
vmkfstools command.
You can create additional swap files using the vmkfstools command. You should
consider adding additional swap files if you want to run additional virtual machines
but you’re unable to do so because of the lack of swap space. See Using vmkfstools on
page 259.
Allocating Memory Dynamically
Virtual machines are allocated their maximum memory size unless memory is
overcommitted. When memory is overcommitted, each virtual machine is allocated
an amount of memory somewhere between its minimum and maximum sizes. The
amount of memory granted to a virtual machine above its minimum size may vary
with the current memory load. The system automatically determines allocations for
each virtual machine based on two factors: the number of shares it has been given
and an estimate of its recent working set size.
ESX Server uses a modified proportional-share memory allocation policy. Memory
shares entitle a virtual machine to a fraction of physical memory. For example, a virtual
machine that has twice as many shares as another is entitled to consume twice as
much memory, subject to their respective minimum and maximum constraints,
provided that they are both actively using the memory they have been allocated. In
general, a virtual machine with S memory shares in a system with an overall total of T
shares is entitled to receive at least a fraction S/T of physical memory.
However, virtual machines that are not actively using their currently allocated
memory automatically have their effective number of shares reduced, by levying a tax
on idle memory. This “memory tax” helps prevent virtual machines from
unproductively hoarding idle memory. A virtual machine is charged more for an idle
page than for a page that it is actively using.