<div dir="ltr"><div>Hello</div><div><br></div><div>Context : <span style="color:rgb(0,0,0);font-family:'Arial Unicode MS',Arial,sans-serif;text-align:-webkit-center">oVirt Engine Version: 3.3.0-4.el6</span></div><div>
<span style="color:rgb(0,0,0);font-family:'Arial Unicode MS',Arial,sans-serif;text-align:-webkit-center"> Hypervisor VDSM : </span><font color="#000000" face="Arial Unicode MS, Arial, sans-serif">vdsm.x86_64 - 4.12.1-2.el6</font></div>
<div><br></div><div>A vm :</div><div>- Memory Size : 1024 Mo<br></div><div>- Physical Memory Guaranteed : 128 Mo ;)<br></div><div>- Memory balloon device enabled</div><div>the vm is running with nearly no activity to have a constant memory used</div>
<div><br></div><div><br></div><div>Testcase</div><div><div>1 : Initial run No change to the balloon </div><div><br></div><div>Total Memory = Balloon 1024 Mo</div><div>Data from vdsClient getVmStats</div><div><br></div><div>
balloonInfo = {'balloon_max': '1048576', 'balloon_min': '131072', 'balloon_target': '1048576', 'balloon_cur': '1048576'}</div><div> memoryStats = {'swap_out': '0', 'majflt': '0', 'mem_free': '920308', 'swap_in': '0', 'pageflt': '7', 'mem_total': '1020576', 'mem_unused': '863500'}</div>
<div> </div><div> Here : mem_total - mem_unused = 157076 correct</div><div><br></div><div>Data get from api (REST or Python : statistics.'memory.used') </div><div>Memory used 128849018.0 = 123 Mo</div><div><br>
</div><div>--------------------------------------------------------------</div><div>If i modify the balloon by the command vdsClient setBalloonTarget 524288 (512*1024)</div><div>i got</div><div> vds</div><div> balloonInfo = {'balloon_max': '1048576', 'balloon_min': '131072', 'balloon_target': '524288', 'balloon_cur': '524288'}</div>
<div> memoryStats = {'swap_out': '0', 'majflt': '0', 'mem_free': '396044', 'swap_in': '0', 'pageflt': '7', 'mem_total': '496288', 'mem_unused': '339228'}</div>
<div> </div><div> mem_total - mem_unused = 157076 correct value<br></div><div><br></div><div><br></div><div> API.statistics</div><div>Memory used = 665719930.0 = 635 Mo ==> (512+123)</div><div><br></div><div>--------------------------------------------------------------<br>
</div><div><br></div><div>Setting a balloon to 262144 (256*1024)</div><div><br></div><div><span class="" style="white-space:pre">        </span>balloonInfo = {'balloon_max': '1048576', 'balloon_min': '131072', 'balloon_target': '262144', 'balloon_cur': '262144'}</div>
<div><span class="" style="white-space:pre">        </span>memoryStats = {'swap_out': '0', 'majflt': '0', 'mem_free': '133916', 'swap_in': '0', 'pageflt': '6', 'mem_total': '234144', 'mem_unused': '76224'}</div>
<div><br></div><div> mem_total - mem_unused = correct value</div><div><br></div><div>API.statistics:</div><div>Memory used = 934155386.0 = 891 Mo (768+123)</div></div><div><br></div><div>To get the correct value from the api i need to fdo [ (Memory Used/1024)- (Balloon Max - Balloon Current) ] / 1024<br>
</div><div><br></div><div><br></div><div>-------------</div><div><br></div><div>Of course display in manager is also wrong</div><div><br></div><div>No Balloon parameter modified</div><div><br></div><div><a href="http://screencast.com/t/rGhKJgeB2ol">http://screencast.com/t/rGhKJgeB2ol</a><br>
</div><div><br></div><div>Balloon 512</div><div><br></div><div><a href="http://screencast.com/t/L7geTfnI">http://screencast.com/t/L7geTfnI</a><br></div><div><br></div><div>Balloon 256</div><div><br></div><div><a href="http://screencast.com/t/8jBllKXtGt7">http://screencast.com/t/8jBllKXtGt7</a><br>
</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Should we consider this as a bug ?</div><div>Do you plan to change the formula to compupte the memory used ?</div><div><br></div><div><br></div><div>
<br>
</div><div>Regards</div><br clear="all"><div><div dir="ltr"><div>Hervé Leclerc</div><div>CTO</div><div>Alter Way</div><div>1, rue royale</div><div>9 ème étage</div><div>92210 St Cloud</div><div>+33 1 78152407</div><div>+33 6 83979598</div>
<div><a></a><span></span><span></span><br></div><div><a href="http://www.alterway.fr/signatures/url/1" target="_blank"><img src="http://www.alterway.fr/signatures/img/1"></a><br></div></div></div>
</div>