VMware ESX Server provides dynamic control over the amount of physical memory allocated to each virtual machine. You may overcommit memory, if you wish, so the total size configured for all running virtual machines exceeds the total amount of available physical memory. The system manages the allocation of memory to virtual machines automatically based on allocation parameters and system load.
You may specify initial memory allocation values for a virtual machine in its configuration file. You may also modify most memory allocation parameters dynamically using the VMware Management Interface, the procfs interface on the console operating system or the Perl API. Reasonable defaults are used automatically when parameters are not specified explicitly.
You have access to information about current memory allocations and other status information through the management interface, the procfs interface on the console operating system and the Perl API.
Three basic parameters control the allocation of memory to each virtual machine:
The system automatically allocates an amount of memory to each virtual machine somewhere between its minimum and maximum sizes based on its shares and an estimate of its recent working set size.
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 generally entitled to consume twice as much memory, subject to their respective minimum and maximum constraints, provided they are both actively using the memory they have been allocated.
VMware ESX Server uses an admission control policy to ensure that sufficient unreserved memory and swap space are available before powering on a virtual machine. Memory must be reserved for the virtual machine’s guaranteed minimum size; additional overhead memory is required for virtualization. Thus the total required for each virtual machine is the specified minimum plus overhead.
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.
VMware 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.
Many VMware ESX Server workloads present opportunities for sharing memory across virtual machines. For example, several virtual machines may be running instances of the same guest operating system, have the same applications or components loaded, or contain common data. In such cases, VMware ESX Server uses a proprietary transparent page sharing technique to eliminate redundant copies of memory pages securely. With memory sharing, a workload running in virtual machines often consumes less memory than it would when running on physical machines. As a result, higher levels of overcommitment can be supported efficiently.
The VMware ESX Server approach does not require any cooperation from the guest operating system. You may use the MemShareScanVM and MemShareScanTotal configuration options to control the rate at which the system scans memory to identify opportunities for sharing memory.
© 2001-2002 VMware, Inc. All rights reserved.