Two components contribute to the memory footprint of the XenServer host. First, the memory consumed by the Xen hypervisor itself. Second, there is the memory consumed by the Control Domain of the host. Also known as ‘Domain0’, or ‘dom0’, the Control Domain is a secure, privileged Linux VM that runs the XenServer management toolstack (XAPI). Besides providing XenServer management functions, the Control Domain also runs the driver stack that provides user created VM access to physical devices.
Control domain memory
The amount of memory allocated to the Control Domain is adjusted automatically and is based on the amount of physical memory on the physical host:
|Host Memory (GB)||Control Domain Memory Allocated (MB)|
The amount reported in the XenServer section in XenCenter includes the memory used by the Control Domain (dom0), the Xen hypervisor itself, and the crash kernel. Therefore, the amount of memory reported in XenCenter can exceed these values. The amount of memory used by the hypervisor is larger for hosts using more memory.
Change the amount of memory allocated to the control domain
You can reduce the memory allocated to the Control Domain to lower than the default 752 MB on hosts with smaller memory (less than 16 GB). However, Citrix recommends that you do not reduce the dom0 memory below 400 MB.
On the XenServer host, open a local shell and log on as root.
Type the following:
/opt/xensource/libexec/xen-cmdline --set-xen dom0_mem=<nn>M,max:<nn>M
<nn>represents the amount of memory, in MB, to be allocated to dom0.
Restart the XenServer host using XenCenter or the
rebootcommand on the xsconsole.
When the host restarts, on the xsconsole, run the
freecommand to verify the new memory settings.
Increasing the amount of memory allocated to the Control Domain results in less memory being available to VMs.
You can increase the amount of memory allocated to the Control Domain beyond the amount shown in the Control domain memory table. However, you must do this operation under the guidance of Citrix Support.
How much memory is available to VMs?
To find out how much host memory is available to be assigned to VMs, find the value of the free memory of the host by running
memory-free . Then type the command
vm-compute-maximum-memory to get the actual amount of free memory that can be allocated to the VM. For example:
xe host-list uuid=host_uuid params=memory-free xe vm-compute-maximum-memory vm=vm_name total=host_memory_free_value