Xen dom0 dedicated memory and preventing dom0 memory ballooning

Source: Internet
Author: User
Tags xen hypervisor

You shoshould always dedicate fixed amount of RAM for xen dom0.

This can be done by specifying "dom0_mem = 512 M" option for xen hypervisor (usually xen.gz) in grub. conf/menu. lst. this makes sure the initial size of memory allocated for dom0 is 512 MB (Replace with the amount of memory you want), and the rest of the Ram is available for other guests in xen hypervisor. see this grub. conf example for grub1:

 

 
Title xen 4.1.0/pv_ops dom0 kernel 2.6.32.36 root (hd0, 0) kernel/xen-4.0.gz dom0_mem = 512 M loglvl = All guest_loglvl = All module/vmlinuz-2.6.32.36 Ro root =/dev/sda2 console = hvc0 earlyprintk = xen nomodeset module/initrd-2.6.32.36.img

The next step is to configure xend to make sure dom0 memory is never ballooned down while starting new guests.

This can be done by editing/etc/xen/xend-config.sxp and modifying the "dom0-min-mem" option to (dom0-min-mem 512) and also change the "enable-dom0-ballooning" option to (enable-dom0-ballooning no ). these options will make sure xend never takes any memory away from dom0.

After making these changes to grub. conf and to xend-config.sxp, reboot the system. after reboot you will notice dom0 has only 512 MB of memory, and the rest of the Ram is available in xen hypervisor as a free memory. you can run "XM list" to verify the amount of memory dom0 has, and "XM Info" to verify the amount of free memory in xen hypervisor.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.