Location

You are here: Front page / Articles / The big Linux distribution/environment battery test

The big Linux distribution/environment battery test

Author: Carsten Boysen Jensen

2 April 2009

My quest to confirm or bust some myths regarding desktop environments, window managers, distributions and battery time on Linux and to find out how we do and/or should define lightness.

What is lightness?

How do we define lightness?

Is something fast also efficient with ressources (RAM, battery)?

I have oftend heard that less is more. Somehow it makes sense that if you use smaller programs they both start faster and use less ressources. But is it true when we talk about battery time?

Another great myth that has a had time to die is that GNOME is light and similar that KDE is really heavy. Well, once upon a time it might have been true... But how does it look today?

I set out to get some numbers in the hope that they could help me answer some or all of these questions.

Test system

Laptop make and model: Zepto Znote 3215W

The tests were run on a clean machine, with default installation of the individual environments, unless otherwise noted. A small script was used to force the laptop into powersaving but no other tweaks were done.

Script used for battery-savings can be found here: savebattery.sh

All battery tests are run with machine idling and the lid closed, to get better constant than me working at the machine. So these numbers show minimum consumption possible on this laptop. On distributions that made the laptop suspend when the lid closed this feature was disabled.

The RAM numbers are real RAM usage, meaning the -/+ numbers given by 'free -m'. And they are in MB.

All times were taken with the same stopwatch. And with fresh restarts and full battery.

Where 'n/a' is used as a result, the output was cached and returned the same data as in the beginning of the test. Judge for yourself if you would trust your data to a system that does this...

Test 1

Test duration: 30 minutes.

Battery-life is calculated on basis of usage percentage and test duration (in seconds) to get the theoretical maximum usage of the entire battery. Time is given in the format hours:minutes:seconds and represents the maximum you can have this laptop turned while running on battery.

For all test-situations goes that where nothing else is marked, 'startx' was used to start the graphical environments. (g) marks use of gdm. (k) marks use of kdm. (s) marks use of slim.

Were (1) is used it's without battery-saving, distribution default settings.

Were (2) is used it's with battery-saving.

Percent used battery was calculated from the output from the commandline tool 'acpi'.

KDE-Four-Live note: This is an OpenSuse-based livecd-distribution with option to install to disk. Test was run on an installed system. This system does not offer a commandline interface as it was designed to test-run KDE4.

To get a reference point we start with the commandline. Some distributions doesn't honor this interface and by default boots directly to graphical interface by default, they have been excluded from this list.

Boottime is from lilo or grub to 'Login:' for CLI.

Date Distro Kernel version Boot time RAM(1) RAM(2) %(1) %(2) Bat.-life(1) Bat.-life(2)
20080320 Arch Linux 2.6.24.3 0:18 17 17 n/a 10 4:57:37
20080321 Debian Lenny 2.6.24 0:31 16 16 n/a 10 4:57:37
20080410 Debian Etch 2.6.18 (i686) 0:23 18 18 10 9 4:57:37 5:33:20
20080514 CentOS 5.1 2.6.18 0:47 49

This logical should be the very minimum for RAM and % and the maximum battery-life (according to the less is more myth).

Now the interesting part. 'Boot total' column is to compare with the graphical-only distributions and to give a more realistic time "to wait before you can work". This means the time from grub/lilo to login-manager + start time.

Start time is time from desktop-manager (graphical login) to fully loaded.

Date Distro Environment Time start Boot total RAM(1) RAM(2) %(1) %(2) Bat.-life(1) Bat.-life(2)
20080413 Fedora 8 Fluxbox 1.0.0 (g) 0:02 1:06 145 144 8 8 6:18:47 6:18:47
20080320 Arch Linux Gnome 2.20.3 (g) 0:08 0:37 123 123 n/a 9 5:33:20
20080321 Debian Lenny Gnome 2.20.3 (g) 0:10 0:55 147 147 9 9 5:33:20 5:33:20
20080412 Ubuntu 7.10 Gnome 2.6.22 (g) 0:14 0:48 186 189 8 7 6:18:47 7:07:21
20080412 Fedora 8 Gnome 2.20.3 (g) 0:16 1:20 283 282 9 9 5:33:20 5:33:20
20080414 BLAG GNU/Linux 70000 Gnome 2.18.3 (g) 0:05 0:56 164 164 9 9 5:33:20 5:33:20
20080414 CentOS 5.1 Gnome 2.16.0 (g) 0:08 1:10 182
20080415 OpenSUSE 10.3 Gnome 2.20.0 (g) 1:02 157 156 10 10 4:57:37 4:57:37
20080320 Arch Linux KDE 3.5.9 (k) 0:11 0:40 118 118 11 9 4:33:13 5:33:20
20080321 Debian Lenny KDE 3.5.8 (k) 0:10 0:57 126 126 9 9 5:33:20 5:33:20
20080410 Debian Etch KDE 3.5.5 (k) 0:09 0:41 115 8 6:18:47
20080412 Kubuntu 7.10 KDE 3.5.8 (k) 0:22 0:54 161 161 8 9 6:18:47 5:33:20
20080413 Fedora 8 KDE 3.5.9 (g) 0:17 1:20 199 203 8 7 6:18:47 7:07:21
20080414 CentOS 5.1 KDE 3.5.4 (g) 0:09 1:12 147
20080415 openSUSE 10.3 KDE 3.5.7 (k) 0:49 131 113 8 8 6:18:47 6:18:47
20080422 KDE-Four-Live.i686.1.0.66 KDE 4.0.66 (k) 0:13 0:49 126 124 8 8 6:18:47 6:18:47
20080728 Arch Linux KDE 4.1.0 (k) 0:15 0:43 162 160 19 10 2:38:44 4:57:37
20080615 Arch Linux Lxde 0.3.2.1 (s) 0:02 0:28 95 95 19 8 2:38:44 6:18:47
20080621 Debian Lenny Lxde 0.3.2.1 (s) 0:04 0:35 107 106 14 13 3:33:40 3:51:29
20080617 Arch Linux Openbox 3.4.7.2 (s) 0:01 0:26 92 9 5:33:20
20080320 Arch Linux Xfce 4.4.2 (s) 0:08 0:33 111 111 8 10 6:18:47 4:57:37
20080321 Debian Lenny Xfce 4.4.2 (s) 0:07 0:47 116 116 9 9 5:33:20 5:33:20
20080411 Xubuntu 7.10 Xfce 4.4.1 (g) 0:07 0:41 148 147 8 7 6:18:47 7:07:21
20080413 Fedora 8 Xfce 4.4.2 (g) 0:10 1:12 193 193 9 8 5:33:20 6:18:47
20080417 Arch Linux Xfce 4.4.2 (s) 0:07 0:34 110 7 7:07:21

What we see here is that the different environments plays differently on the battery on different distributions. There is no clear winner and no clear loser except Lxde on Debian Lenny which has the by far worst battery time with only 3 hours and 51 minutes.

Test 2

Test duration: 10 minutes.

To confirm above numbers I did a second test run were I crapped the mAh directly from the /proc/acpi/battery/BAT1/state

Battery-life is calculated on basis of test duration (in seconds) and used mAh. Time is given in the format hours:minutes:seconds and represents the maximum you can have this laptop turned while running on battery.

Slackware note:Tests run on a single installation (full). Graphical environments started with 'startx' to avoid loading kdelibs (kdm) with the window managers, etc. Openbox and Lxde are the builds made by Alien Bob (external link) as they are not part of the Slackware release.

Date Distro Kernel version Boot time RAM(1) RAM(2) mAh(1) mAh(2) Bat.-life(1) Bat.-life(2)
20081128 Slackware 12.1 2.6.24.5 (huge-smp) 31 31 336 240 2:22:51 3:20:00
20081128 Debian Etch-and-a-half 2.6.24-etchnhalf.1-686 17 240 192 3:20:00 4:10:00
20081129 Debian Lenny 2.6.26-1-686 16 n/a 192 4:10:00
20081210 Arch 2.6.27.7 0:15 15 n/a 144 5:33:20
20081216 Slackware 12.2 2.6.27.7 (huge-smp) 0:41 42 144 5:33:20

Kernel verson 2.6.27 seems to behave really nice regarding the battery.

Date Distro Environment Time start Boot total RAM(1) RAM(2) mAh(1) mAh(2) Bat.-life(1) Bat.-life(2)
20081128 Slackware 12.1 Blackbox 0.65.0 112 102 240 144 3:20:00 5:33:20
20081128 Debian Etch-and-a-half Blackbox 0.70.1 89 n/a 192 4:10:00
20081129 Debian Lenny Blackbox 0.70.1 90 n/a n/a
20081210 Arch Blackbox 0.70.1 0:08 0:23 90 n/a 144 5:33:20
20081216 Slackware 12.2 Blackbox 0.65.0 0:08 0:49 113 240 3:20:00
20081128 Slackware 12.1 Fluxbox 1.0.0 113 103 240 192 3:20:00 4:10:00
20081128 Debian Etch-and-a-half Fluxbox 0.9.14 89 n/a n/a
20081129 Debian Lenny Fluxbox 1.0.0 91 n/a n/a
20081210 Arch Fluxbox 1.1.1 0:08 0:23 96 n/a n/a
20081216 Slackware 12.2 Fluxbox 1.1.1 0:08 0:49 114 144 5:33:20
20081128 Debian Etch-and-a-half Gnome 2.14.3.6 (g) 138 141 288 192 2:46:39 4:10:00
20081129 Debian Lenny Gnome 2.22.2 (g) 150 432 240 1:51:06 3:20:00
20081210 Arch Gnome 2.24.2 0:17 0:32 169 240 192 3:20:00 4:10:00
20081128 Slackware 12.1 KDE 3.5.9 160 126 288 144 2:46:39 5:33:20
20081128 Debian Etch-and-a-half KDE 3.5.5 120 114 192 144 4:10:00 5:33:20
20081129 Debian Lenny KDE 3.5.9 (k) 119 240 144 3:20:00 5:33:20
20081210 Arch KDE 4.1.3 0:22 0:37 167 n/a 144 5:33:20
20081216 Slackware 12.2 KDE 3.5.10 0:21 1:02 144 144 5:33:20
20081128 Slackware 12.1 Lxde 0.3.2.1 129 129 288 192 2:46:39 4:10:00
20081129 Debian Lenny Lxde 0.3.2.1 (g) 109 384 192 2:05:00 4:10:00
20081210 Arch Lxde 0.3.2.1 0:10 0:25 92 n/a n/a
20081128 Slackware 12.1 Openbox 3.4.7.2 115 115 240 192 3:20:00 4:10:00
20081128 Debian Etch-and-a-half Openbox 3.3 88 88 n/a n/a
20081129 Debian Lenny Openbox 3.4.7.2 99 n/a n/a
20081210 Arch Openbox 3.4.7.2 0:07 0:22 91 n/a n/a
20081128 Slackware 12.1 Xfce 4.4.3 140 134 288 192 2:46:39 4:10:00
20081128 Debian Etch-and-a-half Xfce 4.3.99.2 113 113 288 192 2:46:39 4:10:00
20081129 Debian Lenny Xfce 4.4.2.1 116 384 288 2:05:00 2:46:39
20081210 Arch Xfce 4.4.3 0:12 0:37 107 240 144 3:20:00 5:33:20
20081216 Slackware 12.2 Xfce 4.4.3 0:12 0:53 171 96 8:20:00

A small note on the great battery-time from Slackware on Xfce from 20081216: This is without any applets running, as soon as any applet is enabled it drops to 4 hours and 10 minutes - as the Slackware test from 20081128.

In this test KDE seems to take the lead, leaving Xfce, Gnome, Fluxbox, Lxde and Openbox in the dust. This time with Xfce on Debian Lenny as the worst with only 2 hours and 46 minutes. Blackbox does well on some systems and medium to bad on other.

There doesn't seem to be a pattern. RAM usage and boottime has no clear connection to battery time. Also number of processes running has little influence on the battery time it seems, as there are no clear difference between the "light" distributions and the "heavy" ones.

Test 3

To compare and maybe confirm the above two tests, I did a third test on another laptop. This test is run and shown like test 2 but run for a bit longer.

Laptop make and model: Zepto B15 Titan (M760S)

Test duration: 30 minutes.

Debian note: Debian has serious problems on this laptop and is only installable in graphical mode. No results available for commandline-only as the verbosity of the Debian system (any version) fills the screen with garbage. I was unable to lower the verbosity enough to be able to read the results.

Everall this laptop is not recommendable for Linux as the SiS chipset used in it is poorly supported and SiS has no intentions to help the free community. Let this be a warning to anybody who is shopping for a laptop: Don't buy one with SiS in it!

Date Distro Kernel version Boot time RAM(1) RAM(2) mAh(1) mAh(2) Bat.-life(1) Bat.-life(2)
20090214 Slackware 12.2 2.6.27.7 (huge-smp) 0:40 40 40 798 658 2:47:36 3:23:15

Not very impressive. I guess the big harddisk has something to do with the bad battery time. Bigger is not better in a laptop.

Date Distro Environment Time start Boot total RAM(1) RAM(2) mAh(1) mAh(2) Bat.-life(1) Bat.-life(2)
20090215 Slackware 12.2 Blackbox 0.65.0 0:04 0:45 53 53 764 607 2:55:03 3:40:20
20090215 Slackware 12.2 Fluxbox 1.1.1 0:04 0:45 56 56 756 604 2:56:54 3:41:25
20090217 Debian Lenny Gnome 2.22.3 (g) 0:13 0:33 88 88 768 616 2:47:36 3:37:07
20090214 Slackware 12.2 KDE 3.5.10 0:14 0:54 87 85 778 620 2:51:54 3:35:43
20090216 Debian Lenny KDE 3.5.9 (k) 0:10 0:38 59 55 767 615 2:54:22 3:37:28
20090217 Debian Lenny Lxde 0.3.2.1 (g) 0:05 0:32 45 45 786 625 2:50:09 3:33:59
20090214 Slackware 12.2 Xfce 4.4.3 0:09 0:48 115 115 1129 614 1:58:27 3:37:49
20090217 Debian Lenny Xfce 4.4.2 0:14 0:34 53 52 768 604 2:54:08 3:41:25

Not much to say. Almost no difference here. Lxde on Debian is still the worst. Fluxbox on Slackware and Xfce on Debian takes the lead. But no clear winner or loser to find on this laptop.

Conclusion

Well I guess the only conclusion to draw from this is to ignore anybody who says: "This or that system is great for your laptop." Just use the environment and distribution you fell most comfortable in.

I recorded some variations like disabling/enabling applets in kde. But it didn't make a difference. Likewise for the level of eyecandy in KDE.

I also logged CPU usage and number of processes in some of the tests. That didn't help me see a pattern other than they being roughly the same across distributions and environments.

I also did a few test to see if filesystems and using noatime at mount-time made a difference. There were little or no difference.

My best guess on why some systems have better batterytime would be that these systems doesn't spin-up the drive too much.

The contents was last modified on 20 May 2009, at 02:06 (CEST)