HOWTO save electricity

From LinuxReviews
Jump to navigationJump to search

Modern computers support several ways to save electricity on laptops, desktops and servers. Scaling down the CPU under normal/low load, suspending idle harddrives and system hibernation are the most important ways to save precious power.

Automatic tools

There are two highly recommended tools available for controlling a systems power usage:

These tools are designed primarily for laptops and change a whole range of settings depending on the current power source. They are designed to let the system run full speed ahead when they are connected to a AC adapter and tune down a lot of things when the system is running on a battery.

These tools can also be configured to always tune down the system, even when connected to a AC adapter. There are numerous good reasons to do so. Electricity is not free and only limited amounts are typically available if your house is powered by solar panels.

CPU frequency scaling

A modern AMD CPU supports more than it's top speed. The 2800 MHz Phenom II CPU, for example, supports running at 800, 1600, 2100 and 2800 MHz. Typical desktop usage (terminal, text editor, web browser, e-mail client, etc) rarely requires the CPUs full speed. Why would your CPU need more than 800 MHz to view this webpage? Perhaps if you are compiling LibreOffice in the background..

Make sure you have these kernel settings enabled (they are on most distributions):

File: kernel config

The program cpufreq-set can be used to set the CPU governor, like this:

File: /usr/local/bin/cpufreq-set--example
cpufreq-set -c 0 -g conservative --min 800
cpufreq-set -c 1 -g conservative --min 800
cpufreq-set -c 2 -g conservative --min 800

Another way of doing it which gives more control:

File: /usr/local/bin/cpufreq-set--concervative
echo > conservative  /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo 98 > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo 60 > /sys/devices/system/cpu/cpufreq/conservative/down_threshold

By default, up_threshold is 80 and down_threshold is 20.

IBM Research story is that up_threshold of 98 and down_threshold of 95 will save you the most electricity.

Suspend to RAM and more importantly, disk

Suspend to RAM is quite underrated and most of us can and should use it a whole lot more once it is setup.