Contents

Dynamic Memory Control (DMC)

Website Visitors:

XenServer DMC (sometimes known as “dynamic memory optimization”, “memory overcommit” or “memory ballooning”) works by automatically adjusting the memory of running VMs, keeping the amount of memory allocated to each VM between specified minimum and maximum memory values, guaranteeing performance and permitting greater density of VMs per server.

Without DMC, when a server is full, starting further VMs will fail 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, even when the server is full, XenServer will attempt to reclaim memory by automatically reducing the current memory allocation of running VMs within their defined memory ranges.

Dynamic and static memory range

For each VM, you can set a dynamic memory range which is the range within which memory can be added/removed from the VM without requiring a reboot. You can adjust the dynamic range while the VM is running, without having to reboot it. XenServer always guarantees to keep the amount of memory allocated to the VM within the dynamic range. For example, if the Dynamic Minimum Memory was set at 512 MB and the Dynamic Maximum Memory was set at 1024 MB, this would give the VM a Dynamic Memory Range (DMR) of 512 - 1024 MB, within which it would operate. With DMC, XenServer guarantees at all times to assign each VM memory within its specified DMR.

When the host server’s memory is plentiful, all running VMs will receive their Dynamic Maximum Memory level; when the host’s memory is scarce, all running VMs will 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 XenServer supports do not fully support dynamically adding or removing memory. As a result, XenServer must declare the maximum amount of memory that a VM will ever be asked to consume at the time that the VM boots to allow the guest operating system to size its page tables and other memory management structures accordingly. This introduces the concept of a static memory rangewithin XenServer. The static memory range cannot be adjusted while the VM is running, and the dynamic range is constrained such as to be always contained within this static range until the VM is next rebooted. Note that the static minimum (the lower bound of the static range) is there to protect the administrator and is set to the lowest amount of memory that the OS can run with on XenServer.

Important: Citrix advises you not to change the static minimum level as this is set at the supported level per operating system: refer to theXenServer Administrator’s Guide for more details. By setting a static maximum level higher than a dynamic max, if you need to allocate more memory to a VM in the future, you can do so 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 system; these are detailed in the XenServer Administrator’s Guide.

Note: The Dynamic Memory Control feature is available in XenServer Advanced Edition and higher. To learn more about the features available in different XenServer Editions, click here.

Configure DMC

To enable DMC

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

To disable DMC

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

Click here to get the Quick guide on DMC

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: