Installation guide

38
Appendix D. Xen Memory Usage
When calculating the memory footprint of a Xen host there are two components that must be
taken into consideration. First there is the memory consumed by the Xen hypervisor itself; then
there is the memory consumed by the host's control domain. The control domain is a privileged
VM that provides low-level services to other VMs, such as providing access to physical devices.
It also runs the management tool stack.
D.1. Memory scaling algorithm
On a XenServer host, the Xen hypervisor (and its associated system tools) occupies approxi-
mately 128 MB of RAM.
Calculating the memory consumed by the control domain is more complicated, since this value
depends on the amount of physical RAM in the particular host. The memory used by the control
domain is always at least 200MB, and is never more than 752MB; within that range it is scaled
as a linear function of total host RAM. For hosts with up to 3.5GB of physical RAM, the control
domain usage remains at 200MB; on a 5GB host the control domain will use 228MB; on a 16GB
host the control domain consumes 454MB; and on hosts with 32GB or more the control domain
consumes 752MB.
D.1.1. Increasing the reserved memory size
The default memory scaling algorithm is designed to be sufficient for using normal guest oper-
ating systems with over 256MB of RAM and 2-4 virtual disks. If you have more specialized re-
quirements (e.g. a large number of VMs with 64MB of RAM each, and 7 virtual disks each), you
may need to tweak the amount of memory reserved for the control domain. This is an advanced
operation, and you may wish to contact Citrix Support before doing this.
When you have installed your XenServer host, log into the host console and type in cat /proc/
meminfo. The value of MemTotal will tell you how much memory has been reserved for the
control domain. If your control domain is under memory pressure, the value of the SwapFree
parameter will be lower than the SwapTotal, and you may improve overall system performance
by increasing the reserved memory.
The memory reservation algorithm is based on the total amount of RAM in your XenServer host,
and is calculated by:B + (G * T) where T is the total RAM in the host (in MB), B represents the
base amount of memory, and G represents the memory gradient. The memory gradient is the
scaling parameter which increases the control domain memory as the amount of host memory
increases, and defaults to 0.0205. The base memory defaults to 126MB.
The value of the memory gradient can be increased by altering the value in
XAPI_DOM0_MEM_GRADIENT in the /etc/sysconfig/xapi configuration file, and rebooting
the system. Do not decrease the memory gradient under any circumstances. Similarly, the base
memory value can be increased by altering the value in XAPI_DOM0_MEM_BASE in the /etc/
sysconfig/xapi configuration file, and should also not be decreased.