This article describes how to configure Dom0 memory settings in XenServer 5.6 or later.
By using the sample provided in CTX124086 – XenServer Single Server Scalability with XenDesktop, modify the Xen command-line that is found in /boot/extlinux.conf to contain dom0_mem=2940M.
To modify the preceding settings, complete the following procedure:
- Log in to Dom0 as root by using the console in XenCenter or by SSH access.
- Ensure to make a copy of original /boot/extlinux.conf file. This helps you to recover the XenServer from an unbootable state if you experience issues.
- Open the file /boot/extlinux.conf by using an editor such as Notepad. Notice that this file contains a header followed by several sections, each introduced by “label”. In each section, you can find a line prefixed “append”. This line specifies the arguments that are passed to XenServer. The one that is usually used is the one with label “xe”. Make the change in each section.
- the existing dom0_mem parameter to read dom0_mem=2940M in the append line of the xe and xe-serial sections.
Following is a sample for reference:
Change the following:
label xe # XenServer kernel mboot.c32 append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=1M crashkernel=64M@32M console=com1 vga=mode-0x0311 — /boot/vmlinuz-2.6-xen root=LABEL=root-ecpmuteu ro xencons=hvc console=hvc0 console=tty0 quiet vga=785 splash — /boot/initrd-2.6-xen.img
label xe # XenServer kernel mboot.c32 append /boot/xen.gz dom0_mem=2940M lowmem_emergency_pool=1M crashkernel=64M@32M console=com1 vga=mode-0x0311 — /boot/vmlinuz-2.6-xen root=LABEL=root-ecpmuteu ro xencons=hvc console=hvc0 console=tty0 quiet vga=785 splash — /boot/initrd-2.6-xen.img
Note: Adjusting Dom0 Memory Settings
The dom0_mem=2940M change allocates more memory to dom0, which implies that it can better handle large numbers of virtual machines. After changing this setting and restarting, provide specific instructions to ensure that dom0 consumes all the memory allocated to it.
On the XenServer host CLI, run the following four-step sequence of commands to adjust the memory setting:
# . /etc/xensource-inventory
# staticmax=`xe vm-param-get uuid=$CONTROL_DOMAIN_UUID param-name=memory-static-max`
# echo staticmax=$staticmax
# xe vm-memory-target-set uuid=$CONTROL_DOMAIN_UUID target=$staticmax
Note the use of backticks, the key to the left of the 1 key on most keyboards rather than apostrophes in the line beginning with “staticmax=…”.
You can confirm if the modifications made to the Dom0 memory are working correctly by running the following command to examine the contents of /proc/xen/balloon:
# cat /proc/xen/balloon
The sum of Current allocation, Low-mem balloon, and High-mem balloon should be equal to (or approximately equal to) the value you have specified in /boot/extlinux.conf. Usually the latter two of these parameters are zero.
You need to run the preceding commands only once. The values you set for the dom0 memory target are saved in the xapi database, which persists across reboots.
There are certain rare circumstances in which XenServer adjusts the memory target automatically. For example, adding more memory to the host, but these circumstances should not affect because the target set is as high as the static-max value.
This implies that if you want to revert to the old behavior, with a standard-sized dom0, you must reverse your changes. Restarting the computer does not revert the configuration to the old settings. When you undo the edits to /boot/extlinux.conf and restart the computer, running the same commands should be equivalent to causing dom0 to revert to 752 megabytes.
Caution! The default value for the dom0_mem parameter is 752 megabytes. On some machines, a higher value results in poor performance.
CTX124259 – Adjusting Dom0 and Xenheap Settings in XenServer