<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>systemBash &#187; Xen</title>
	<atom:link href="http://systembash.com/tags/software/xen/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Fri, 13 Jan 2012 03:18:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Memory Allocation Problems on Xen Server &amp; Fix</title>
		<link>http://systembash.com/content/memory-allocation-problems-on-xen-server-fix/</link>
		<comments>http://systembash.com/content/memory-allocation-problems-on-xen-server-fix/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 13:14:31 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Configurations]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://systembash.com/?p=338</guid>
		<description><![CDATA[Recently I started seeing this error while provisioning Xen VPSes on a server with 8GB of RAM: 12[2009-03-23 15:51:40 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1603) XendDomainInfo.destroy: domid=None [2009-03-23 15:51:40 xend 3310] ERROR (xmlrpclib2:184) (12, 'Cannot allocate memory') I checked the memory, and sure enough, all of the VPSes were using up the memory. More specifically, dom0 (the main server) had &#8216;ballooned&#8217; and begun to take up 3GB of RAM, this is more than the system should need: 12[2009-03-22 18:03:08 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1113) Setting memory target of domain Domain-0 (0) to 2903 MiB. [2009-03-22 18:03:09 xend 3310] DEBUG (balloon:127) Balloon: 537840 KiB free; need 537600; done. Basically when memory ballooning is set, the memory available to the main hypervisor will have a minimum value set and will balloon according to the current requirements. This setting is in the config file which for me is at /etc/xen/xend-config.sxp: 1234# Dom0 will balloon out when....]]></description>
			<content:encoded><![CDATA[<p>Recently I started seeing this error while provisioning Xen VPSes on a server with 8GB of RAM:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[2009-03-23 15:51:40 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1603) XendDomainInfo.destroy: domid=None<br />
[2009-03-23 15:51:40 xend 3310] ERROR (xmlrpclib2:184) (12, 'Cannot allocate memory')</div></td></tr></tbody></table></div>
<p>I checked the memory, and sure enough, all of the VPSes were using up the memory. More specifically, dom0 (the main server) had &#8216;ballooned&#8217; and begun to take up 3GB of RAM, this is more than the system should need:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[2009-03-22 18:03:08 xend.XendDomainInfo 3310] DEBUG (XendDomainInfo:1113) Setting memory target of domain Domain-0 (0) to 2903 MiB.<br />
[2009-03-22 18:03:09 xend 3310] DEBUG (balloon:127) Balloon: 537840 KiB free; need 537600; done.</div></td></tr></tbody></table></div>
<p>Basically when memory ballooning is set, the memory available to the main hypervisor will have a minimum value set and will balloon according to the current requirements. This setting is in the config file which for me is at /etc/xen/xend-config.sxp:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Dom0 will balloon out when needed to free memory for domU.<br />
# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.<br />
# If dom0-min-mem=0, dom0 will never balloon out.<br />
(dom0-min-mem 256)</div></td></tr></tbody></table></div>
<p>I changed this line to:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">(dom0-min-mem 0)</div></td></tr></tbody></table></div>
<p>I also modified grub to set an absolute amount of memory to dom0:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">title CentOS (2.6.18-92.1.22.el5xen)<br />
&nbsp; &nbsp; &nbsp; &nbsp; root (hd0,0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; kernel /xen.gz-2.6.18-92.1.22.el5 dom0_mem=1536M<br />
&nbsp; &nbsp; &nbsp; &nbsp; module /vmlinuz-2.6.18-92.1.22.el5xen ro root=/dev/vg_root/lv_root<br />
&nbsp; &nbsp; &nbsp; &nbsp; module /initrd-2.6.18-92.1.22.el5xen.img</div></td></tr></tbody></table></div>
<p>The value for dom0_mem sets the system memory at boot time. This will be set on the kernel line. Make sure this is large enough to handle system tasks; 1.5G seems to be good for me right now. </p>
<p>Reboot the server to set the memory for dom0.</p>
<p>You could also set the memory usage for dom0 temporarily by using the &#8216;xm mem-set&#8217; command:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Usage: xm mem-set &lt;Domain&gt; &lt;Mem&gt;</div></td></tr></tbody></table></div>
<p>This would not apply after a reboot. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/memory-allocation-problems-on-xen-server-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic

Served from: systembash.com @ 2012-02-08 15:22:32 -->
