<?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>Hypervisor.fr &#187; UMA</title>
	<atom:link href="http://www.hypervisor.fr/?feed=rss2&#038;tag=uma" rel="self" type="application/rss+xml" />
	<link>http://www.hypervisor.fr</link>
	<description>French Bare-Metal weblog</description>
	<lastBuildDate>Wed, 26 Jun 2024 22:42:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>vNUMA : WYSIWYG</title>
		<link>http://www.hypervisor.fr/?p=4540</link>
		<comments>http://www.hypervisor.fr/?p=4540#comments</comments>
		<pubDate>Thu, 10 Jan 2013 18:12:40 +0000</pubDate>
		<dc:creator>NiTRo</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[esxtop]]></category>
		<category><![CDATA[NUMA]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[UMA]]></category>
		<category><![CDATA[vNUMA]]></category>

		<guid isPermaLink="false">http://www.hypervisor.fr/?p=4540</guid>
		<description><![CDATA[Dans l&#8217;optique de rattraper un peu le coût CPU de nos petits excès d&#8217;overcommit, nous nous sommes penché sur les gains potentiel du vNUMA &#8220;forcé&#8221; sur des petites VM (2 ou 4 vCPU).

Rappelons que (dans ce contexte) le vNUMA est la capacité de présenter à la VM une topologie NUMA identique à celle de sa VMM. Cette technique [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Dans l&#8217;optique de rattraper un peu le coût CPU de <a href="http://www.hypervisor.fr/?p=4401" target="_blank">nos petits excès d&#8217;overcommit</a>, nous nous sommes penché sur les gains potentiel du vNUMA &#8220;forcé&#8221; sur des petites VM (2 ou 4 vCPU).</p>
<p style="text-align: center;"><a href="https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-ash4/284810_437328219652885_974183721_n.jpg" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/heinz_wysiwyg.jpg" alt="" width="288" height="366" /></a></p>
<p style="text-align: justify;">Rappelons que (dans ce contexte) le <strong>vNUMA est la capacité de présenter à la VM une topologie <a href="http://www.hypervisor.fr/?p=1801" target="_blank">NUMA</a> identique à celle de sa VMM</strong>. Cette technique permet au guestOS d&#8217;optimiser lui même la répartition process/node pour éviter au maximum les accès à des pages qui ne seraient pas dans le noeud où se trouve le vCPU qui y accède (aka remote access).</p>
<p style="text-align: justify;">L&#8217;idéal serait un <a href="http://frankdenneman.nl/cpu/esx-4-1-numa-scheduling/" target="_blank">des schémas percutant dont Frank Denneman à le secret</a> mais il va falloir vous contenter de cela : <strong>le vNUMA est le <a href="http://en.wikipedia.org/wiki/WYSIWYG" target="_blank">WYSIWYG</a> transposé au NUMA</strong> donc la topologie NUMA que la VM &#8220;voit&#8221; est véritablement celle de sa VMM.</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vNUMA/16vcpu_vnuma_s.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/vNUMA/16vcpu_vnuma_s.png" alt="" width="499" height="120" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vNUMA/16vcpu_coreinfo.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/vNUMA/16vcpu_coreinfo.png" alt="" width="467" height="137" /></a></p>
<p style="text-align: justify;">Présente depuis ESX 5.0, cette fonctionnalité n&#8217;est active par défaut que pour les VM avec *<strong>strictement</strong>* plus de 8 vCPU (=&gt;9 et non 8+) mais <a href="http://www.vmware.com/pdf/Perf_Best_Practices_vSphere5.1.pdf" target="_blank">VMware indique comment l&#8217;activer pour les VM plus petites</a> :</p>
<blockquote>
<p style="text-align: justify;">By default, vNUMA is enabled only for virtual machines with more than eight vCPUs. This feature can be enabled for smaller virtual machines, however, by adding to the .vmx file the line: <strong>numa.vcpu.maxPerVirtualNode</strong> = X (where X is the number of vCPUs per vNUMA node).</p>
</blockquote>
<p style="text-align: justify;">Ce qui est à moitié vrai car avec ce paramètre vous ne forcez que la répartition des vCPU par vNode (topologie présentée à la VM) et non celle des vCPU par pNode (topologie réelle). Heureusement VMware documente plutôt généreusement (en général) et nous avons trouvé <a href="http://pubs.vmware.com/vsphere-51/topic/com.vmware.vsphere.resmgmt.doc/GUID-89C52376-60C3-452A-A269-9F4F7FE489C6.html" target="_blank">l&#8217;autre moitié de la réponse dans le Documentation Center</a> :</p>
<blockquote>
<p style="text-align: justify;"><strong>numa.vcpu.maxPerMachineNode</strong> Maximum number of virtual CPUs that belong to the same virtual machine that can be scheduled on a NUMA node at the same time. <strong><span style="color: #ff0000;">Use this attribute to ensure maximum bandwidth, by forcing different NUMA clients on different NUMA nodes</span></strong>.</p>
</blockquote>
<p style="text-align: justify;">Résultat, même avec 2 vCPU on peut faire du beau vNUMA (avec un beau oneliner) :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vNUMA/2vcpu_2nodes.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/vNUMA/2vcpu_2nodes.png" alt="" width="549" height="381" /></a></p>
<pre class="brush: powershell; title: ; notranslate">Get-VM|?{$_.NumCpu -eq 2}|Get-View|%{$_.ReconfigVM((New-Object VMware.Vim.VirtualMachineConfigSpec -Property @{extraconfig=@((New-Object VMware.Vim.optionvalue -Property @{Key=&quot;numa.vcpu.maxPerVirtualNode&quot;;Value=&quot;1&quot;});(New-Object VMware.Vim.optionvalue -Property @{Key=&quot;numa.vcpu.maxPerMachineNode&quot;;Value=&quot;1&quot;});(New-Object VMware.Vim.optionvalue -Property @{Key=&quot;cpuid.coresPerSocket&quot;;Value=&quot;1&quot;}))}))}</pre>
<p style="text-align: justify;">Et on a même fait des bench (sur un Intel E7520) avec <a href="http://www.sisoftware.co.uk/?d=qa&amp;f=ben_mem" target="_blank">Sandra 2013</a> pour voir s&#8217;il pouvait y avoir un gain (vNUMA en bleu, vUMA en rouge) !</p>
<p style="text-align: justify;"><img class="aligncenter" title="Cache_Bandwidth" src="http://files.hypervisor.fr/img/vNUMA/vNUMA_Cache_Bandwidth.jpg" alt="" width="419" height="389" /></p>
<p style="text-align: justify;"><img class="aligncenter" title="Memory_Bandwidth" src="http://files.hypervisor.fr/img/vNUMA/vNUMA_Memory_Bandwidth.jpg" alt="" width="419" height="389" /></p>
<p style="text-align: justify;"><img class="aligncenter" title="Memory_Latency" src="http://files.hypervisor.fr/img/vNUMA/vNUMA_Memory_Latency.jpg" alt="" width="419" height="378" /></p>
<p style="text-align: justify;">Le gain est mince (<a href="http://labs.vmware.com/download/142/" target="_blank">contrairement aux grosses VM pour faire du HPC</a>) mais sur un host bien overcommité cela peut avoir un véritable intérêt (avant/après) :</p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vNUMA/small_vm_vnuma_off.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/vNUMA/small_vm_vnuma_off.png" alt="" width="420" height="305" /></a></p>
<p style="text-align: center;"><a href="http://files.hypervisor.fr/img/vNUMA/small_vm_vnuma_on.png" target="_blank"><img class="aligncenter" src="http://files.hypervisor.fr/img/vNUMA/small_vm_vnuma_on.png" alt="" width="420" height="305" /></a></p>
<p style="text-align: justify;">Nous avons eu la chance d&#8217;avoir l&#8217;avis de <a href="http://www.linkedin.com/pub/seongbeom-kim/4/330/926" target="_blank">Seongbeom Kim (Senior Member of Technical Staff chez VMware)</a> sur l’intérêt d&#8217;une telle manipulation et sur la raison pour laquelle, <a href="http://files.hypervisor.fr/img/vNUMA/hyper-v3_vnuma.png" target="_blank">contrairement à Hyper-V</a>, vNUMA n&#8217;est pas actif par défaut sur les petites VM :</p>
<blockquote>
<p style="text-align: justify;">Based on your two charts, enabling vNUMA looks good by not migrating memory across NUMA nodes, resulting in 100% local memory.</p>
<p style="text-align: justify;">One consideration should be whether your workload benefits from cache sharing or not. By forcing vcpus scheduled on two or more NUMA nodes, workload with heavy cache sharing may suffer performance loss even with better memory latency.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;">For a <strong>new VM*</strong>, it may pay off to try vNUMA for your VM if #vcpus is greater than the number of cores per NUMA node. <strong>The benefit heavily depends on the workload behavior</strong>.</p>
</blockquote>
<blockquote>
<p style="text-align: justify;">[...] modern processors have enough number of cores to place 2 &#8211; 4 vcpu VM on a NUMA node where vNUMA has no benefit. Even 8 cores per NUMA node is not rare.</p>
</blockquote>
<p style="text-align: justify;">Par &#8220;nouvelle VM&#8221;, Seongbeom sous entend qu&#8217;il y a un risque que le changement de topologie NUMA ait un impact sur le GuestOS et/ou l&#8217;application hébergée dans la VM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypervisor.fr/?feed=rss2&amp;p=4540</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
