Friday, July 30, 2010

Adjusting Dom0 Memory Settings on XenServer5.5

• The “dom0_mem=2940M” change gives more memory to dom0 which means that it can better handle large numbers of VMs. After changing this setting and rebooting, you then need to instruct dom0 to consume all of the memory allocated to it.

• On XenServer 5.5, including updates 1 and 2, the following sequence of commands can be used to achieve this:

. /etc/xensource-inventory

staticmax=`xe vm-param-get uuid=$CONTROL_DOMAIN_UUID param-name=memory-static-max`

echo staticmax=$staticmax

xe vm-param-set uuid=$CONTROL_DOMAIN_UUID memory-dynamic-max=$staticmax

xe vm-memory-target-set uuid=$CONTROL_DOMAIN_UUID target=$staticmax

You can confirm it worked by examining the contents of /proc/xen/balloon. The sum of 'Current allocation', 'Low-mem balloon' and 'High-mem balloon' should be equal to (or be pretty close to) the value you specified in /boot/extlinux.conf. (Usually the latter two of these parameters are zero.)

You only need to execute those commands once. The values you set for the dom0 memory target are saved in the xapi database which persists across reboots.


• There are some (rare) circumstances in which XenServer adjusts the memory target automatically (adds more memory to the host), but these should not affect you because you have set the target as high as static-max.

This means that if you want to go back to the old behavior, with a standard-sized dom0, you must reverse your changes – rebooting does not revert your configuration. If you undo the edits to /boot/extlinux.conf and reboot, executing the same commands should have the effect of causing dom0 to revert to 752 MiB.


Caution! The default value for the “dom0_mem” parameter is 752 MB. There is a historic reason for this value. It may be that on some machines going above this value causes poor performance.


Source :CTX124259

No comments: