N900 software power management

(New page: This is a work in progress. It is not yet ready for public consumption. Please don't link it into wiki yet. =Overview= This page may be useful to application developers, as well as those ...)
(Overview)
Line 37: Line 37:
For example, an alarm application that after it has been told to beep after 12 hours, turns on the audio system immediately to make that beep, then checks every second to see if the 12 hours is up yet.
For example, an alarm application that after it has been told to beep after 12 hours, turns on the audio system immediately to make that beep, then checks every second to see if the 12 hours is up yet.
 +
 +
=Details of each case, eith examples.=
 +
==Direct==
 +
==Indirect==
 +
==Pathalogical==
 +
===Avoidable===
 +
===By Design===
 +
===Unavoidable===
 +
 +
=Tools=
 +
==Powertop==
 +
==Top==
 +
===Htop===
 +
===Dbus-monitor===

Revision as of 13:33, 2 August 2010

This is a work in progress. It is not yet ready for public consumption. Please don't link it into wiki yet.

Contents

Overview

This page may be useful to application developers, as well as those interested in reducing power usage of software by configuring it correctly.

Why software uses power

Software should use power to do what the user wants in the most battery efficient way, without letting the battery efficiency get in the way unless it's unavoidable.

For example, it might be nice to always keep the backlight on, from a user-experience point of view, but this will lead to a battery life of several hours at best, so the compromise of blanking the screen when inactive and on battery is usually made.

Direct

Direct power use is quite simple. The intended function of the application uses power. For example, 'flashlight'.

This application turns on the LED Flash so the user can see.

Once it is active, it needs no CPU, and the screen can be blanked. Almost all of the battery usage in this mode is to cause the desired effect.

'Flashlight' as an application could be viewed as 95% efficient - only 5% or so of the battery is used for stuff other than keeping the flash lit.

Indirect

Indirect is when there is no direct hardware way to perform an action, and some part of the system has to be made to do this without the user explicitly turning it on.

For example, a task-list application might want to alert the user if they get within a certain distance of a task, so they could consider doing it.

So, the application needs some means of location. For example, it could run the GPS, or scan wifi networks in range.

The user doesn't know or care about how the application does it, but how it is done may have a significant effect on battery life.

Pathological

The application chooses - or the system software only permits - an inefficient way to perform a task.

For example, an alarm application that after it has been told to beep after 12 hours, turns on the audio system immediately to make that beep, then checks every second to see if the 12 hours is up yet.

Details of each case, eith examples.

Direct

Indirect

Pathalogical

Avoidable

By Design

Unavoidable

Tools

Powertop

Top

Htop

Dbus-monitor