Continuing on with the last post, I decided to try Windows versus Linux to see how things were. Since most personal computers (as opposed to servers) spend the vast majority of their time idle, I figured the best test would be to boot up the machine, log in, then see what the power draw was after waiting for a minute for everything to settle down. I used my work laptop, a
1.86GHz Pentium M NC6230. I tested it with the
development version of Ubuntu, and Windows XP with all the latest patches.
Some background on power management for
those who haven't for some reason spent the last 30 years deep in technology:
The Pentium M has a power saving feature where it can reduce its' clock speed in steps, from 1.86GHz down to 800MHz. Intel paid their marketing department large sums of money to come up with the name "
SpeedStep" for this. The net effect is that running the processor at a lower speed when idle means it can also run at a lower voltage, and since the calculation for power used (watts) is done by multiplying the power (in amps) required to run the device by the voltage (in, er, volts) required to push the little electrons through the device, dropping both volts and amps can significantly impact the power drawn. In addition, extra tricks can be pulled; for example, if the processor is idle, the processor cache is also idle and can be flushed and then turned off. The reasoning is to increase battery life, but using
SpeedStep when AC power is on will still result in the same power savings.
So, on to the results. First of all, I tried the bootable
warbiking (no, not
that warbiking) configuration I created. This is a basic
Debian install on a USB stick, that has then been stripped down to reduce power usage as much as possible; screen is turned off, processor is forced to 800MHz, all the PCI devices that aren't required (IDE interface, sound card, unused USB ports) are turned off, and the hard drive and CD Rom are turned off. The only things that are running on the hardware side are CPU, memory, USB interface for the USB stick, wireless card, and the necessary glue hardware to stick them all together. On the software side, apart from kernel daemons there's just
Kismet and a
bash shell. I could gain a milliamp by booting straight into Kismet as bash has a wakeup every now and then, but I'd rather be able to log in on the console to do other stuff as needed. Final power usage at idle: 17W
Next, I tried Ubuntu, booted up into a
gnome desktop. I used the "ondemand" speedstep governor; this tweaks the processor speed according to load, so at idle it was running at 800MHz. Power usage at idle: 22W
Next step was power usage at idle with the processor running full speed: 26W
Peak power draw seen was 41W, during shutdown.
Next, I booted up Windows XP. I used
Speedswitch to control the processor speed. Speedswitch has several settings, dynamic switching, max battery, battery optimised, and max battery. The results were:
Dynamic switching: 23-24W
Max battery: 22-24W
Battery optimised: 22-25W
Max performance: 26-27W
Speedswitch disabled: 25-26W
The results from XP were very twitchy - unlike Ubuntu, which, once it settled, had a very stable draw, the XP draw was constantly changing up and down. At first I thought it might simply be that the draw was dead on between two values (23 and 24 W) so it should really be 23.5W; however, all the other settings had the same problem, and with a variance of up to 3W, so that doesn't seem to have been the issue. All I can assume is Windows has so much random code firing off that the processor can never settle down.
So, conclusions to be drawn from this
sample size of one... Since I use ondemand and dynamic switching, for me, the laptop is drawing 22W at idle under Ubuntu, and 23-24W under Windows. This means that Linux is saving me somewhere on the order of 1.5 watts over Windows when I'm sat there not doing anything (such as reading a document). This also means slightly less heat, so the fans will kick in slightly less often, decreasing the power usage a smidgen further on the Linux side.
The other conclusion I've proved to myself (I was pretty sure of it before) is that a laptop is more environmentally friendly in terms of power draw than a desktop machine. I was rather surprised at just how much less draw there was - almost 70 watts!
In biking news... 2 weeks till I'm back on the bike!