load monitor does not scale threshold correctly

Bug #777361 reported by Dustin Kirkland 
12
This bug affects 1 person
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.

=======

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Committed revision 233, which should be SRU'd to 11.04.

Changed in powernap (Ubuntu Natty):
status: New → Triaged
Changed in powernap (Ubuntu Oneiric):
status: New → In Progress
importance: Undecided → High
Changed in powernap (Ubuntu Natty):
importance: Undecided → High
Changed in powernap (Ubuntu Oneiric):
assignee: nobody → Dustin Kirkland (kirkland)
Changed in powernap (Ubuntu Natty):
assignee: nobody → Andres Rodriguez (andreserl)
Revision history for this message
Andres Rodriguez (andreserl) wrote :
Changed in powernap (Ubuntu Natty):
milestone: none → natty-updates
status: Triaged → In Progress
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package powernap - 2.7-0ubuntu1

---------------
powernap (2.7-0ubuntu1) oneiric; urgency=low

  [ Jim Heck ]
  * DiskMonitor: Tracks disks activity by monitoring its state. If
    "standby/sleeping" they are assumed to be inactive. (LP: #738764).

  [ Mathieu Bérard ]
  * actions/kms_powermode: Add action method to enable power management for
    radeon kms driver. Should be removed when applied upstream or pm-utils.

  [ Andres Rodriguez ]
  * sbin/powernapd: Take recover action when entered to powersave with
    powernap-now (LP: #768598)

  [ Dustin Kirkland ]
  * powernap/monitors/LoadMonitor.py: scale monitors correctly, LP: #777361
 -- Andres Rodriguez <email address hidden> Thu, 21 Apr 2011 17:05:37 -0400

Changed in powernap (Ubuntu Oneiric):
status: In Progress → Fix Released
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)
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted powernap into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

The package has been tested and everything works as expected. Marking this as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package powernap - 2.6-0ubuntu2.1

---------------
powernap (2.6-0ubuntu2.1) natty-proposed; urgency=low

  * SRU:
    - powernap/monitors/LoadMonitor.py: scale monitors threshold. Taken
      kirkland's patch commited upstream. (LP: #777361)
 -- Andres Rodriguez <email address hidden> Wed, 04 May 2011 15:31:00 -0400

Changed in powernap (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.