Bug 1260381 - Incorrect behavior of power saving weight module
Incorrect behavior of power saving weight module
Product: ovirt-engine
Classification: oVirt
Component: General (Show other bugs)
All Linux
high Severity medium (vote)
: ovirt-4.0.2
Assigned To: Yanir Quinn
: Triaged, ZStream
Depends On:
Blocks: 1349345
  Show dependency treegraph
Reported: 2015-09-06 05:59 EDT by Artyom
Modified: 2016-08-12 10:29 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1349345 (view as bug list)
Last Closed: 2016-08-12 10:29:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dfediuck: ovirt‑4.0.z+
mgoldboi: planning_ack+
rgolan: devel_ack+
mavital: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 57740 master MERGED core :fix PowerSavingWeight score calculation 2016-06-07 04:35 EDT
oVirt gerrit 59674 ovirt-engine-4.0 MERGED core: fix PowerSavingWeight score calculation 2016-07-12 06:03 EDT

  None (edit)
Description Artyom 2015-09-06 05:59:40 EDT
Description of problem:
Power saving weight module not work in proper way for hosts with zero vms.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have two hosts with the same CPU arch(host_1, host_2)
2. Run vm with 1Gb on host_1
3. Change scheduler policy to power_saving with default parameters
4. Start additional vm

Actual results:
Vm start on host_2

Expected results:
Vm start on host_1

Additional info:
Problem that when host have zero vms, engine give to host score MaxSchedulerWeight - 1(999), but hosts with vms can have score bigger than(999) because expression:
"score -= vds.getMaxSchedulingMemory() / 100;" under calcEvenDistributionScore method in EvenDistributionWeightPolicyUnit class, we can have have negative score, and then under score method in PowerSavingWeightPolicyUnit class we run "score -= calcEvenDistributionScore(vds, vm, vdsGroup != null ? vdsGroup.getCountThreadsAsCores() : false);"
we can have have score bigger than MaxSchedulerWeight score.
Comment 2 Roy Golan 2015-12-16 04:55:29 EST
Possibly a bug. Martin will take a look.
Comment 4 Red Hat Bugzilla Rules Engine 2016-07-03 06:37:19 EDT
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 5 Sandro Bonazzola 2016-07-12 06:05:12 EDT
Moving back to POST since this bug has been targeted to 4.0.1 but referenced patches are not included in 4.0.1 branch.
Please check this bug status and eventually re-target to 4.0.2.
Comment 6 Artyom 2016-07-24 11:04:06 EDT
Verified on rhevm-4.0.2-0.1.rc.el7ev.noarch

Note You need to log in before you can comment on or make changes to this bug.