Contents

Memory Use: Host Operating System and Virtual Machines

VMware GSX Server allows users to set the memory size of each virtual machine and the amount of physical host memory reserved for virtual machines. By adjusting the memory sizes of each virtual machine and the amount of reserved memory, users can affect both virtual machine and overall system performance. The following sections describe how VMware GSX Server uses the memory configuration parameters to properly manage virtual machines and reserved memory.

Virtual Machine Memory Size

The first configuration parameter users can set is the size of the virtual machine’s physical memory. This configuration parameter can be set via the Configuration Editor (Settings > Configuration Editor > Memory). The minimum size of the memory for the virtual machine should be set based on the recommendations of the operating system provider.

The Configuration Wizard sets what VMware believes are reasonable defaults for the memory size of a virtual machine based on the type of the guest operating system and the amount of memory in the host computer.

The actual size that should be given to a virtual machine depends on a few practical considerations:

Windows operating systems do not behave well when they run low on free memory. For this reason users should not run virtual machines whose memory requirements exceed that of the host and other applications. To help guard against virtual machines causing the host to thrash, VMware GSX Server enforces a limit on the total amount of memory that may be consumed by virtual machines.

The sum of the memories of all currently running virtual machines plus overhead for the VMware GSX Server processes cannot exceed the amount of physical memory on the host minus some memory that must be kept available for the host.

Some memory must be kept available on the host to ensure the host is able to operate properly while virtual machines are running. The amount of memory reserved for the host depends on the host and the size of the host’s memory.

If you want the most memory out of your virtual machine and are pushing close to the supported limits, you should expect that if you run the virtual machine for a while, power it off and change settings in the Configuration Editor (especially increasing the virtual machine’s memory size), then try to power it back on, the virtual machine may not power on. If this happens, close the console in which you tried opening the virtual machine, and open a new console. The virtual machine should power on.

Reserved Memory

The second configuration parameter that users can set is the amount of memory that VMware GSX Server is allowed to reserve for all running virtual machines. This parameter can be set in Settings > Reserved Memory.

This setting specifies a maximum amount that VMware GSX Server is allowed to reserve. But this memory is not allocated in advance. Even if multiple virtual machines are running at the same time, however, VMware GSX Server may be using only a fraction of the reserved memory. Any unused reserved memory is available to be used by other applications. If all the reserved memory is in use by one or more virtual machines, the host operating system cannot use this memory itself or allow other applications to use it.

The memory used by VMware GSX Server includes the memory made available to the guest operating systems plus a small amount of overhead memory associated with running a virtual machine.

The amount of memory actually used for a particular virtual machine varies dynamically as a virtual machine runs. If multiple virtual machines run simultaneously, they work together to manage the reserved memory.

The recommended amount of memory to reserve for all running virtual machines is calculated on the basis of the host computer’s physical memory and is displayed in the reserved memory settings control — Settings > Reserved Memory. If you determine you want VMware GSX Server to reserve more or less physical memory, you can use this control to change the amount.

Reserving too much physical memory can cause the host to thrash, or even hang, if other applications are run on the host. Reserving too little physical memory can cause virtual machines to perform very poorly and also limit the number of virtual machines that can be run.

Limits on the Number of Running Virtual Machines

By default, VMware GSX Server limits the number of virtual machines that can run at once based on the amount of reserved memory. This is done to prevent virtual machines from causing each other to perform very poorly. If you try to power on a virtual machine and there is not enough reserved memory available, it fails to power on.

You can change the memory check so it only displays a warning message, rather than preventing the virtual machine from powering on. To do so, go to Settings > Reserved Memory and clear the Enable Memory Limits check box.

Disabling Memory Checks for Virtual Machines

By default, virtual machines perform checks to ensure that the amount of memory allocated to running virtual machines plus an overhead does not exceed the limits imposed by the user or by VMware GSX Server defaults.

If you need to allocate more memory to your virtual machines, you can disable the memory checks (also called memory limits) and change the memory limits. When you disable the memory checks, you:

Caution: Disabling the memory limits check can result in poor performance for both the host operating system and guest operating systems. Disabling memory checks can also result in system crashes, low memory warnings, or processes in the host abnormally terminating.

To disable memory checks, complete the following steps.

  1. In a local console, select Settings > Reserved Memory.
  2. If you want to allow virtual machines to exceed the amount of memory reserved for them, deselect Enable memory limits.
  3. Click OK.

Using More than 1GB of Memory on a Linux 2.2.x Kernel Host

By default, Linux kernels in the 2.2.x series support 1GB of physical memory. If you want to use more memory in Linux, you can take one of several approaches.

The CONFIG_2GB option calls for recompiling your kernel as a 2GB kernel. You do this by recompiling your kernel with CONFIG_2GB enabled. This allows Linux to support nearly 2GB of physical memory by dividing the address space into a 2GB user chunk and 2GB kernel chunk (as opposed to the normal 3GB user and 1GB kernel).

The third approach uses the CONFIG_BIGMEM option in Linux. With the CONFIG_BIGMEM option enabled, the kernel does not directly address all of physical memory and it can then map 1GB (or 2GB) of physical memory into the address space at a time. This allows the use of all of physical memory at the cost of changing the semantics the kernel uses to map virtual to physical addresses. However, VMware products expect physical memory to be mapped directly in the kernel’s address space and thus do not work properly with the CONFIG_BIGMEM option enabled.

Workarounds

If you are using a 1GB kernel with CONFIG_BIGMEM enabled and have 960MB to 1983MB of memory, VMware GSX Server does not run. To work around this issue, you can either:

If you have a 1GB kernel with CONFIG_BIGMEM enabled and have more than 1983MB of memory, you can do one of the following:

If you are using a 2GB kernel with CONFIG_BIGMEM enabled and have 1984MB or more memory, VMware GSX Server does not run. You can either pass the boot-time switch mem=1983M at the LILO prompt, or add it to lilo.conf, to disable CONFIG_BIGMEM and thus allow you to run VMware GSX Server. To use the switch:

Related Topics:

Back to top

© 2001-2002 VMware, Inc. All rights reserved.