Greg Padgett has posted comments on this change.

Change subject: Fix the way we compute cpu_load average and add tests for it
......................................................................


Patch Set 2:

(3 comments)

http://gerrit.ovirt.org/#/c/24783/2/ovirt_hosted_engine_ha/agent/constants.py.in
File ovirt_hosted_engine_ha/agent/constants.py.in:

Line 85: # Maximum request error count
Line 86: MAX_ERROR_COUNT = 3
Line 87: 
Line 88: # The length of history
Line 89: STATS_HISTORY_SECS = 150
Seems like a short sampling period on which a migration decision might be made. 
(Then again, I don't know how spikey a typical node load graph is...) Could be 
configurable, too, either now or a future patch.


http://gerrit.ovirt.org/#/c/24783/2/ovirt_hosted_engine_ha/agent/states.py
File ovirt_hosted_engine_ha/agent/states.py:

Line 123:                         extra=log_filter.lf_args('score-mgmtbridge',
Line 124:                                                  self.LF_PENALTY_INT))
Line 125:             score -= score_cfg['mgmt-bridge-score-penalty']
Line 126: 
Line 127:         # Compute cpu load average (not counting load caused by
I previously avoided the term "load average" because the cpu-load submonitor 
returns a number normalized to the cpu core count--so it is usually [0,1] 
(threads/core need better handling, but I digress...)  A comment here noting 
the difference is probably sufficient.
Line 128:         # the engine vm.  The default load penalty is:
Line 129:         #   load 0-40% : 0
Line 130:         #   load 40-90%: 0 to 1000 (rising linearly with increasing 
load)
Line 131:         #   load 90%+  : 1000


Line 129:         #   load 0-40% : 0
Line 130:         #   load 40-90%: 0 to 1000 (rising linearly with increasing 
load)
Line 131:         #   load 90%+  : 1000
Line 132:         # Thus, a load of 80% causes an 800 point penalty
Line 133:         load_average = load_factor(self.data) * 100.0
Why *100?
Line 134: 
Line 135:         if score_cfg['cpu-load-penalty-max'] \
Line 136:                 == score_cfg['cpu-load-penalty-min']:
Line 137:             # Avoid divide by 0 in penalty calculation below


-- 
To view, visit http://gerrit.ovirt.org/24783
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id9e05c753f41dcd94d5a4734ac39f90581ddc0c0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Jiří Moskovčák <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to