<?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>vPivot &#187; balloon</title>
	<atom:link href="http://vpivot.com/tag/balloon/feed/" rel="self" type="application/rss+xml" />
	<link>http://vpivot.com</link>
	<description>Scott Drummonds on Virtualization</description>
	<lastBuildDate>Wed, 01 Feb 2012 06:46:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ESX Memory Management: Ballooning Rules</title>
		<link>http://vpivot.com/2009/09/25/esx-memory-management-ballooning-rules/</link>
		<comments>http://vpivot.com/2009/09/25/esx-memory-management-ballooning-rules/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 10:01:29 +0000</pubDate>
		<dc:creator>drummonds</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[balloon]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://vpivot.com/?p=10</guid>
		<description><![CDATA[[Taken from my communities blog, this article shows you why you should "Love Your Balloon Driver".] Earlier this month we finally published one of my favorite papers from ongoing vSphere launch activities. This paper on ESX memory management, written by Fei Guo of performance engineering, has three graphs that are absolute gems. They show balloon [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Taken from <a href="http://communities.vmware.com/blogs/drummonds/2009/09/09/love-your-balloon-driver">my communities blog</a>, this article shows you why you should "Love Your Balloon Driver".]</em></p>
<p>Earlier this month we finally published one of my favorite papers from ongoing vSphere launch activities.  This <a class="jive-link-external" href="http://www.vmware.com/resources/techresources/10062">paper on ESX memory management</a>, written by Fei Guo of performance engineering, has three graphs that are absolute gems. They show balloon driver memory savings next to throughput numbers for three common benchmarks.  The conclusion is inescapable: the balloon driver reclaims memory from over-provisioned VMs with virtually no impact to performance.  This is true on every workload save one: Java.<br />
<span id="more-10"></span><br />
<h2>Example 1: Kernel Compile</h2>
<p>Linux kernel compilation models a common developer environment.  This process is CPU- and IO-intensive but uses very little memory.</p>
<p><img class="jive-image-thumbnail jive-image" src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/38-4976-6949/Picture+1.png" alt="Picture 1.png" width="620" /></p>
<p>Results of two experiments are shown on this graph: in one configuration memory is reclaimed only through ballooning and in the other memory is reclaimed only through host swapping.  The bars show the amount of memory reclaimed by ESX and the line shows the workload performance.  The steadily falling green line reveals a predictable deterioration of performance due to host swapping.  The red line holds steady, demonstrating that as the balloon driver inflates, kernel compile performance is unchanged.</p>
<p>Kernel compilation performance remains high with ballooning because this workload needs very little memory and the guest OS can easily take unused pages from the application.  Performance falls with swapping because ESX randomly selects virtual machine pages for swapping whether those pages are in use by the application or not.  The guest OS is better at selecting pages for reclamation than ESX is.</p>
<h2>Example 2: Oracle/Swingbench</h2>
<p>Oracle&#8217;s database is best tested against Swingbench, the OLTP load generation tool provided by Oracle.  Database workloads utilize all system resources but show a non-linear dependence on memory.  Memory can be safely reclaimed from OSes running databases until the cache becomes smaller than needed by the workload.  The following figure shows this.</p>
<p><img class="jive-image-thumbnail jive-image" src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/38-4976-6950/Picture+2.png" alt="Picture 2.png" width="620" /></p>
<p>As before, the virtual machine using only ballooning maintains higher performance under memory pressure than the virtual machine whose memory is being swapped away by the host.  Performance remains high as the balloon driver inflates until it encroaches into the 2G SGA.  Again, ESX&#8217;s host swapping randomly selects pages to send to disk which degrades performance at all swap amounts.</p>
<p>As with kernel compile, the balloon driver safely reclaims memory from over-provisioned VMs with little impact to application performance.</p>
<h2>Example 3: Java/SPECjbb</h2>
<p>Java provides a special challenge in virtual environments due to the JVM&#8217;s introduction of a third level of memory management.  The balloon driver draws memory from the virtual machine without impacting throughput because the guest OS efficiently claims pages that its processes are not using.  But in the case of Java, the guest OS is unaware of how the JVM is using memory and is forced to select memory pages as arbitrarily and inefficiently as ESX&#8217;s swap routine.</p>
<p><img class="jive-image-thumbnail jive-image" src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/38-4976-6951/Picture+3.png" alt="Picture 3.png" width="620" /></p>
<p>Neither ESX nor the guest OS can efficiently take memory from the JVM without significantly degrading performance.  Memory in Java is managed inside the JVM and efforts by the host or guest to remove pages will both degrade Java applications&#8217; performance.  In these environments it is wise to manually set the JVM&#8217;s heap size and specify memory reservations for the virtual machine in ESX to account for the JVM, OS, and heap.</p>
<h2>Conclusions and Scott&#8217;s Special Recommendation</h2>
<p>Love your balloon driver.  Your application owners are always asking for more memory than they need.  With great comfort you can over-provision memory some and rely on ESX and the balloon driver to reclaim what is not in use.  Without the balloon driver, ESX will be forced to use its last technology for managing memory over-commit: host swapping.  And host swapping always hurts performance.</p>
<p>So here is my special recommendation: never, ever disable the balloon driver. This eliminates efficient ballooning as an option to ESX.  Should any of that virtual machine&#8217;s memory be needed, ESX can only swap it out. Where ballooning usually will not hurt performance, swapping always will.  If you <em>must</em> protect an application from memory reclamation due to memory over-commitment, use reservations.  They make admission control more effective, they self-document the needs of the VM, and they are easily configured.</p>
]]></content:encoded>
			<wfw:commentRss>http://vpivot.com/2009/09/25/esx-memory-management-ballooning-rules/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

