ReducedPowerUsage

Differences between revisions 3 and 4
Revision 3 as of 2006-06-08 03:01:00
Size: 1554
Editor: S0106000fb085cc63
Comment: uhh, london, yeah
Revision 4 as of 2006-07-03 12:30:30
Size: 2113
Editor: 202-155-165-25
Comment: reduce swappiness/vm use on battery
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
/etc/acpi/ac.d/10-swappiness.sh
{{{#!/bin/bash

echo 60 > /proc/sys/vm/swappiness

echo 3000 > /proc/sys/vm/dirty_expire_centisecs
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
echo 10 > /proc/sys/vm/dirty_background_ratio
echo 40 > /proc/sys/vm/dirty_ratio}}}

/etc/acpi/battery.d/10-swappiness.sh
{{{#!/bin/bash

echo 10 > /proc/sys/vm/swappiness

echo 0 > /proc/sys/vm/dirty_expire_centisecs
echo 0 > /proc/sys/vm/dirty_writeback_centisecs

echo 60 > /proc/sys/vm/dirty_background_ratio
echo 95 > /proc/sys/vm/dirty_ratio}}}

Summary

Battery life is very dear to laptop users and thus we need to take a look at proactive ways to reduce power usage. This will involve profiling what is causing battery usage (screen, hdd hits, etc.) and working to reduce them.

Rationale

We want to increase usage of Ubuntu on laptops and help those existing users by making their experience better.

Use cases

  • Jane is travelling on a plane from Cape Town to London and would like to be able to work on her document for as long as possible. With two batteries, she can almost make the entire flight, but not quite.
  • Alan works in the field and can only charge his laptop from generator, which only runs at night. During the day he works off a car battery, charged at night from the generator. He would like to be able to last the whole day on a single car battery.

Scope

  • Any package in the default install which can cause excessive battery usage, such as accessing the harddrive, etc.

Design

  • Profile a current install of Ubuntu to figure out what is using the battery
  • Tweak each program in turn to reduce power usage

Implementation

Code

/etc/acpi/ac.d/10-swappiness.sh {{{#!/bin/bash

echo 60 > /proc/sys/vm/swappiness

echo 3000 > /proc/sys/vm/dirty_expire_centisecs echo 500 > /proc/sys/vm/dirty_writeback_centisecs echo 10 > /proc/sys/vm/dirty_background_ratio echo 40 > /proc/sys/vm/dirty_ratio}}}

/etc/acpi/battery.d/10-swappiness.sh {{{#!/bin/bash

echo 10 > /proc/sys/vm/swappiness

echo 0 > /proc/sys/vm/dirty_expire_centisecs echo 0 > /proc/sys/vm/dirty_writeback_centisecs

echo 60 > /proc/sys/vm/dirty_background_ratio echo 95 > /proc/sys/vm/dirty_ratio}}}

Data preservation and migration

None

Outstanding issues


CategorySpec

ReducedPowerUsage (last edited 2008-08-06 16:13:43 by localhost)