Change in ovirt-engine[master]: Fix memory based filtering

rgolan at redhat.com rgolan at redhat.com
Mon Dec 21 08:58:19 UTC 2015


Roy Golan has submitted this change and it was merged.

Change subject: Fix memory based filtering
......................................................................


Fix memory based filtering

There are two memory based rules that have to be obeyed
for a successful VM start.

1) QEMU can allocate the full VM memory when starting the
   VM process. sysctl option vm.overcommit_memory then
   controls whether the malloc call succeeds even though
   there is not enough free memory at the time.

   The allocation is not visible in free memory reporting,
   because the kernel memory pages are then assigned on
   demand.

   This does not happen always, but we can't really tell
   in advance and so we need to make sure the necessary
   memory is available for the malloc call to succeed
   (even though the memory won't be actually used).

   The pending mechanism is used, but only counts the
   guest overhead memory consumption for this case as
   it is unlikely the VM will eat more memory faster
   than VDSM reports it to the engine.

2) oVirt over-commitment rules limit the total amount
   of VM memory that can be assigned on a host.
   This amount does not correspond to the actual used
   physical memory, it represents the theoretical maximum
   of memory all VMs on a host can consume.

   The full memory is used in the pending counter for
   this case.

We already had number two (sans a tiny change to the
formula). Rule number one is a new one and it will
not cause more memory or swap usage, because it only
makes the rules more strict together.

This patch also fixes a small bug in deserialization of
memFree when retrieved as part of the full VDS entity.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1180071
Change-Id: I335324841b8df6561d6aa2203a394164d44ee9a9
Signed-off-by: Martin Sivak <msivak at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SlaValidator.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/VdsFreeMemoryChecker.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingMemory.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/pending/PendingOvercommitMemory.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/MemoryPolicyUnit.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/SlaValidatorTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDaoImpl.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VdsDaoTest.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
17 files changed, 321 insertions(+), 78 deletions(-)

Approvals:
  Martin Sivák: Verified
  Jenkins CI: Passed CI tests
  Roy Golan: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/48864
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I335324841b8df6561d6aa2203a394164d44ee9a9
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tomer Saban <tsaban at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list