load monitor does not scale threshold correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
powernap (Ubuntu) |
Fix Released
|
High
|
Dustin Kirkland | ||
Natty |
Fix Released
|
High
|
Andres Rodriguez | ||
Oneiric |
Fix Released
|
High
|
Dustin Kirkland |
Bug Description
Binary package hint: powernap
Setting the LoadMonitor threshold to "n" should scale according to the number of cpu's on the system. PowerNap, of course, reduces the number of online CPUs when powernaping. The load monitor needs to take this into account.
Additionally, the current methods of obtaining the number of CPUs and the current load average should both be replaced with native, more efficient native python alternatives.
=======
SRU Justification
IMPACT:
This bug affects PowerNap's Load Monitor threshold when is set to automatically determine the load. Let's consider an scenario where the number of cores of the system is 4. When PowerNap enters PowerSave mode, then it will be running with only 1 out of 4 cores. However, when the load is higher than 1 and lesser than 4, then PowerNap should take recover action, but it doesn't. Instead PowerNap will only take recover action when the load is higher than the initial number of cores, which is incorrect. This causes the machine to run with lesser codes when there's higher load and should.
REPRODUCE:
1. Install powernap.
2. Let PowerNap enter into powersave.
3. Try to raise the load of the machine to more than 1, and less than the amount of cores in machine.
4. The machine will not take recover action.
HOW FIXED:
The fix is simple, instead of obtaining the number of cores when the Monitor is instanced, it will obtain the number of course each time the check for activity is done.
PATCH:
Attached. Uploaded to natty-proposed for review.
REGRESSION POTENTIAL:
Minimal. This has been tested thoroughly.
=======
Changed in powernap (Ubuntu Natty): | |
milestone: | none → natty-updates |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
Changed in powernap (Ubuntu Natty): | |
status: | In Progress → New |
assignee: | Andres Rodriguez (andreserl) → nobody |
Changed in powernap (Ubuntu Natty): | |
status: | New → Fix Committed |
assignee: | nobody → Andres Rodriguez (andreserl) |
Committed revision 233, which should be SRU'd to 11.04.