XenCenter

Configuring VM Memory

When a VM is first created, it is allocated a fixed amount of memory. To improve the utilization of physical memory in your Citrix Hypervisor environment, you can use Dynamic Memory Control (DMC). DMC is a memory management feature that enables dynamic reallocation of memory between VMs.

The Memory tab in XenCenter shows memory usage and configuration information for your VMs and servers.

  • For servers, the total available memory and the current memory usage are shown, and you can see how memory is divided between hosted VMs.
  • For VMs, in addition to current memory usage you can also see the VM’s memory configuration information. That configuration includes whether DMC is enabled and the current dynamic minimum and maximum values. You can edit DMC configuration settings in this tab.

VMs with the same memory configuration are grouped in the Memory tab, enabling you to view and configure memory settings for individual VMs and for groups of VMs.

Dynamic Memory Control (DMC)

Dynamic memory control (sometimes known as dynamic memory optimization, memory overcommit, or memory ballooning) works by automatically adjusting the memory of running VMs.

  • DMC keeps the amount of memory allocated to each VM between specified minimum and maximum memory values
  • DMC guarantees performance
  • DMC permits greater density of VMs per server

Without DMC, if you start further VMs when a server is full, the action fails with “out of memory” errors. To reduce the existing VM memory allocation and make room for more VMs, you must edit each VM’s memory allocation and then reboot the VM. With DMC enabled, Citrix Hypervisor attempts to reclaim memory by automatically reducing the current memory allocation of running VMs within their defined memory ranges.

Note:

Dynamic Memory Control is deprecated in Citrix Hypervisor 8.1 and will be removed in a future release.

Dynamic and static memory range

For each VM, you can set a dynamic memory range. This dynamic memory range is the range within which memory can be added or removed from the VM without requiring a reboot. You can adjust the dynamic range while the VM is running, without having to reboot it. Citrix Hypervisor always guarantees to keep the amount of memory allocated to the VM within the dynamic range. For example, if the Dynamic Minimum Memory is 512 MB and the Dynamic Maximum Memory is 1,024 MB, the VM has a Dynamic Memory Range of 512–1,024 MB. The VM operates within this range. With DMC, Citrix Hypervisor guarantees to always assign each VM memory within its specified DMR.

When host memory is plentiful, all running VMs receive their Dynamic Maximum Memory level. When host memory is scarce, all running VMs receive their Dynamic Minimum Memory level. If new VMs are required to start on full servers, running VMs have their memory squeezed to start new ones. The required extra memory is obtained by squeezing the existing running VMs proportionally within their pre-defined dynamic ranges.

Many Operating Systems that Citrix Hypervisor supports do not fully support dynamically adding or removing memory. As a result, the Citrix Hypervisor server must declare the maximum amount of memory that a VM can be asked to consume when the VM starts. The guest operating system can use this information to size its page tables and other memory management structures accordingly. This feature introduces the concept of a static memory range within the Citrix Hypervisor product. The static memory range cannot be adjusted while the VM is running. The dynamic range is constrained such as to be always contained within this static range until the VM is next rebooted. The static minimum is there to protect the administrator. Set the static minimum to the lowest amount of memory that the OS can run with on a Citrix Hypervisor server.

Important:

Citrix advises you not to change the static minimum level as this value is set at the supported level per operating system. By setting a static maximum level higher than a dynamic max, you can allocate more memory to a VM in the future without requiring a reboot.

DMC memory constraints

XenCenter enforces the following constraints when setting DMC values:

  • The minimum dynamic memory value cannot be lower than the static minimum memory value.
  • The minimum dynamic memory value cannot be greater than the maximum dynamic memory value.
  • The maximum dynamic memory value cannot be greater than the maximum static memory value.

You can change a VM’s memory properties to any values that satisfy these constraints, subject to validation checks. In addition to these constraints, Citrix supports only certain VM memory configurations for specific operating systems.

To enable DMC

  1. Choose a VM or server in the Resources pane and select the Memory tab.
  2. Select the Edit button for the VM or group of VMs you want to configure.
  3. For multiple VMs with the same current memory configuration, choose the VMs you want to configure and click Next.
  4. Select the Automatically allocate memory within this range option.
  5. Set the required maximum and minimum dynamic memory range values by using the slider or by typing the values directly.
  6. Click OK to apply the changes and close the dialog box.

To disable DMC

  1. Choose the VM or server in the Resources pane and select the Memory tab.
  2. Select the Edit button for the VM or group of VMs you want to configure.
  3. For multiple VMs with the same current memory configuration, choose the VMs you want to configure and click Next.
  4. Select the Set a fixed memory option.
  5. Specify the amount of memory to allocate.
  6. Click OK to apply the changes and close the dialog box.

Configuring VM Memory