VMware

VMware Workstation 4.5

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Memory Usage Notes

Memory Usage Notes

VMware Workstation allows you to make the following memory-related settings:

  • The memory size of a particular virtual machine
  • The amount of the host computer's RAM that can be used for virtual machines.
  • The extent to which you want to allow the host operating system's memory manager to swap virtual machines out of physical RAM

By adjusting these three settings, you can affect both virtual machine and overall system performance.

This section describes how VMware Workstation uses the memory configuration parameters to manage virtual machines and system memory properly.

Virtual Machine Memory Size

Virtual Machine Memory Size

The first configuration parameter you can set is the size of an individual virtual machine's memory. Set this configuration parameter for the virtual machine in the virtual machine settings editor (VM > Settings > Memory). The guest memory size should not be set lower than the minimum recommendations of the operating system provider.

The New Virtual Machine Wizard sets 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. This value also appears in the virtual machine settings editor as the recommended memory value.

The virtual machine settings editor also shows a value for the maximum amount of memory for best performance. If you have only one virtual machine running on the host and you set virtual machine memory to this value, the virtual machine can run entirely in RAM. A virtual machine running completely in RAM performs better than a virtual machine that must swap some of its memory to disk.

The actual memory size you should give to a virtual machine depends on a few practical considerations:

  • What kinds of applications will run in the virtual machine
  • What other virtual machines will contend with this virtual machine for memory resources
  • What applications will run on the host at the same time as the virtual machine

Note: You cannot allocate more than 2GB of memory to a virtual machine if the virtual machine's files are stored on a file system such as FAT32 that does not support files greater than 2GB.

The total amount of memory you assign to all virtual machines running on a single host may not exceed 4GB.

Memory Use on the Host

Memory Use on the Host

Host operating systems do not behave well when they run low on free memory for their own use. When a Windows or Linux host operating system does not have enough RAM for its own use, it thrashes — it constantly swaps parts of itself between RAM and its paging file on disk. To help guard against virtual machines causing the host to thrash, VMware Workstation enforces a limit on the total amount of RAM that may be consumed by virtual machines.

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 operating system and the size of the host computer's memory.

Specifying How Much RAM Is Used by All Virtual Machines

Specifying How Much RAM Is Used by All Virtual Machines

The second configuration parameter you can set is the amount of RAM that VMware Workstation is allowed to reserve for all running virtual machines combined. To set this parameter, go to Edit > Preferences > Memory.

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

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

The amount of RAM 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 memory.

The recommended amount of RAM to specify for all running virtual machines is calculated on the basis of the host computer's physical memory and appears in the reserved memory control — Edit > Preferences > Memory. If you want VMware Workstation to use more or less RAM, move this slider to change the amount.

If you set this value too high, the host may thrash when other applications are run on the host. If you set this value too low, virtual machines may perform very poorly and you cannot run as many virtual machines at once.

Using Additional Memory

Using Additional Memory

By default, VMware Workstation limits the number of virtual machines that can run at once based on the amount of memory specified in the application settings. This prevents virtual machines from causing each other to perform poorly.

To allow more or larger virtual machines to run, you can adjust a third setting — the amount of virtual machine memory that the host operating system may swap to disk. To change this setting, go to Edit > Preferences > Memory and change the additional memory setting. Select one of the following radio buttons:

  • Fit all virtual machine memory into reserved host RAM — Strictly apply the reserved memory limit set in the top of the panel. This setting imposes the tightest restrictions on the number and memory size of virtual machines that may run at a given time. Because the virtual machines are running entirely in RAM, they have the best possible performance.
  • Allow some virtual machine memory to be swapped — Allow the host operating system to swap a moderate amount of virtual machine memory to disk if necessary. This setting allows you to increase the number or memory size of virtual machines that can run on the host computer at a given time. It may also result in reduced performance if virtual machine memory must be shifted between RAM and disk.
  • Allow most virtual machine memory to be swapped — Allow the host operating system to swap as much virtual machine memory to disk as it wants. This setting allows you to run even more virtual machines with even more memory than the intermediate setting does. In this case, too, performance may be lower if virtual machine memory must be shifted between RAM and disk.

If you try to power on a virtual machine and there is not enough memory available, VMware Workstation displays a warning message. The message shows how much memory the virtual machine is configured to use and how much memory is available. To try to power on the virtual machine using the available memory, click OK. If you do not want to power on the virtual machine, click Cancel.

Using More Than 1GB of Memory on a Linux Host

Using More Than 1GB of Memory on a Linux 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.

  • Upgrade to a 2.4.x series kernel that allows for more physical memory.
  • Recompile your kernel as a 2GB kernel using the CONFIG_2GB option.
  • Enable the CONFIG_BIGMEM option to map more physical memory. (This approach requires special steps, described in detail in the Workarounds section below, to work with VMware products.)

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 section and a 2GB kernel section (as opposed to the normal division of 3GB for user and 1GB for 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

Workarounds

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

  • Recompile the kernel as a 2GB kernel by enabling the CONFIG_2GB option. This allows for 100 percent use of physical memory.
  • Pass the boot-time switch mem=959M at the LILO prompt, or add it to lilo.conf, to disable CONFIG_BIGMEM and thus allow you to run VMware Workstation. To do this:
    • At the LILO prompt, type linux-2.2.16xxx mem=959M.
    • Or, edit lilo.conf. In the kernel section, add this line:
      append mem="959M"

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

  • Recompile the kernel as a 2GB kernel by enabling the CONFIG_2GB option and either pass the boot-time switch mem=1983M at the LILO prompt or add it to lilo.conf. To use the switch:
    • At the LILO prompt, type linux-2.2.16xxx mem=1983M.
    • Or, edit lilo.conf. In the kernel section, add this line:
      append mem="1983M"
  • Pass the boot-time switch mem=959M at the LILO prompt or add it to lilo.conf to disable CONFIG_BIGMEM. To use the switch:
    • At the LILO prompt, type linux-2.2.16xxx mem=959M.
    • Or, edit lilo.conf. In the kernel section, add this line:
      append mem="959M"

If you are using a 2GB kernel with CONFIG_BIGMEM enabled and have 1984MB or more memory, VMware Workstation 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 Workstation. To use the switch:

  • At the LILO prompt, type linux-2.2.16xxx mem=1983M.
  • Or, edit lilo.conf. In the kernel section, add this line:
    append mem="1983M"

previous Prev   Contents   Last   Next next