Friday, January 11, 2013

Memory set for a Xen Node

After installing a Xen server we need to cap the Xen Node's total Moemory, If it is not set ,the Total memory of the server will assigned to "Domain-0" and we can not add new VPS on this newly created Xen Node.

We can cap the host node memory by editing /etc/grub.conf ,
Suppose we want to cap 512MB RAM then we should add dom0_mem=512m at the end of Kernel parameter.

title CentOS (2.6.18-308.24.1.el5xen)
        root (hd0,0)
        kernel /boot/xen.gz-3.4.4 dom0_mem=512m
        module /boot/vmlinuz-2.6.18-308.24.1.el5xen ro root=LABEL=/
        module /boot/initrd-2.6.18-308.24.1.el5xen.img

After this changed i have rebooted the server.

#] shutdown -r -f now

  Before capping :
[root@server.ajeesh ~]# free -m
total used free shared buffers cached
Mem: 3521 1386 2134 0 148 931
-/+ buffers/cache: 305 3215
Swap: 4094 0 4094


xm info
total_memory : 4094
free_memory : 4

After the capping :

 [root@server.ajeesh ~]# free -m
total used free shared buffers cached
Mem: 512 418 93 0 35 181
-/+ buffers/cache: 200 311
Swap: 4094 0 4094

Xm info
 total_memory : 4094
free_memory : 3013



No comments:

Post a Comment