Bug 866186

Summary: "Max free Memory for scheduling new VMs" reporting negative values
Product: Red Hat Enterprise Virtualization Manager Reporter: Ido Begun <ibegun>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Begun <ibegun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: asegundo, bazulay, dyasny, iheim, lpeer, oramraz, Rhev-m-bugs, sgrinber, yeylon, ykaul, yzaslavs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: si22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Logs none

Description Ido Begun 2012-10-14 14:39:20 UTC
Created attachment 626993 [details]
Logs

Description of problem:
"Max free Memory for scheduling new VMs" is reporting negative values.

Version-Release number of selected component (if applicable):
rhevm-3.1.0-20.el6ev.noarch

Using a 16GB host, I've added 2 VM's with 8GB each (of which 4GB are guaranteed), and ran them.

>> vdsClient -s 0 getVdsCaps | grep memSize
memSize = 15829

>> vdsClient -s 0 getVdsCaps | grep reservedMem
reservedMem = 321

With those numbers, I got:

Max free Memory for scheduling new VMs = -1006 MB

Comment 1 Simon Grinberg 2012-10-14 15:46:45 UTC
This may happen due to over commit being just an estimation for the actual consolidation capabilities. However any negative value in calculation should be translated to 0 on the value reported to the UI and API.

Comment 2 Amador Pahim 2012-10-15 12:54:50 UTC
The negative value seems expected. According with BZ#846677, the field calculation formula is:

   ( over commit * host memory )
                 - 
   ( host memory committed + host reserved )

In your case, if overcommit policy is "no overcommit", you need to add 1518 MB to host in order to run a new VM with Physical Memory Guaranteed = 512 MB, for example. Or change the overcommit policy.

Comment 3 Roy Golan 2012-10-21 14:04:52 UTC
http://gerrit.ovirt.org/#/c/8701

Comment 7 Ido Begun 2012-11-01 16:34:17 UTC
OK - SI23

"Max free Memory for scheduling new VMs" no longer reports negative values - reports 0 instead.