Martin Sivák has posted comments on this change.

Change subject: Fix the CPU quota MOM policy computations
......................................................................


Patch Set 8:

(2 comments)

https://gerrit.ovirt.org/#/c/39411/8/tests/momPolicyTests.py
File tests/momPolicyTests.py:

Line 49:             "vcpu_quota": None,
Line 50:             "vcpu_period": None
Line 51:         })
Line 52: 
Line 53:         config_policy_string = 
self._getPolicyContent("00-defines.policy")
> line 53-60 are repeating for every test. care to refactor them out?
Theoretically yes, but all the tests are testing the same policy file. Which is 
just a start :)

I think I could write a helper to fully load and check a policy file though.
Line 54:         cpu_policy_string = self._getPolicyContent("04-cputune.policy")
Line 55: 
Line 56:         self.assertEqual(True,
Line 57:                          p.set_policy("00-defines", 
config_policy_string))


Line 143:                          p.set_policy("04-cputune", 
cpu_policy_string))
Line 144: 
Line 145:         p.evaluate(host, [vm])
Line 146: 
Line 147:         self.assertEqual(vm.controls["vcpu_quota"], 1100)
> doesn't look like 10%
But it is. Multiply it by the number of logical CPUs and you get 10% of the 
full performance :)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1f014d1b4058ef447a962cbda3336115e8610dc
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to