Friday, 26 June 2009

Ubuntu Power Saving Improvements

Yesterday I compared power consumption between two different versions of Ubuntu. I dual boot installed Ubuntu Intrepid and Jaunty on a Dell Inspiron 6400 laptop (Dual core 1.6GHz, 1MB RAM) and installed powertop and also DVD reading software using packages from Medibuntu. I then removed the battery from the laptop and plugged the mains power adapter into a power meter to measure power consumption.

My aim was to benchmark the power consumption for three scenarios:

1) Idle for 10 minutes
2) Running Firefox on 3 Flash enabled sites (, and for 10 minutes
3) Playing 4 minutes from a DVD

I ran powertop to look at how much time the system was in the C0 state (CPU running) and to observe the number of Wakeups-from-idle per second. I also installed sensors-applet to monitor CPU and HDD temperature changes during the benchmarking.

In the Idle case, Intrepid was waking up ~60.5 times a second and drawing 30.0 Watts while Jaunty was waking up ~56.8 times a second and drawing 29.2 Watts, so there was some power saving improvement with Jaunty. CPU temperatures were comparable at 42 degrees C (which is quite hot!). There was very little difference between times in C0 (running) states between Intrepid and Jaunty.

For the Firefox test the number of wakeups was difficult to get a stable measurement, since the flash was generating a lot of irregular activity and so it was difficult to compare like for like. Intrepid was drawing ~30.6 Watts and the CPU was ~43.5 degrees C, where as for Jaunty I observed ~29.3 Watts and a higher temperature of ~45.4 degrees C, which is a little perplexing.

Finally, for the VLC DVD playing test. Intrepid drew 35.7 Watts and the CPU warmed to 49.3 degrees C while Jaunty drew 35.0 Watts and warmed to 51.8 degrees C (again a little perplexing why it's warmer and drew less power overall).

From my crude set of tests we can see that Jaunty does seem to show some power improvements in all three test scenarios. As yet, I'm perplexed why Jaunty is drawing less power but the CPU is getting slightly warmer in the non-idle tests; this needs further investigation (any ideas why?)


  1. If you did the Intrepid tests before the Jaunty tests, maybe your two degree temperature difference between I & J is due to heat build-up inside the laptop case?

    Repeating and interleaving the tests while monitoring the _rise_ in temperature would put my speculation to the test.

  2. Geeko, in fact I did the Jaunty tests first, and I gave the laptop some time to cool, so I think we can factor that out. If I have time I will repeat the tests with a Karmic Alpha to see if there is any other data points to work from.

  3. Given the consistent anecdotal differences between power consumption and temperature you might consider whether J is making better use of the dual nature of the processor than I and hence is using RAM less?

  4. fowlbruce: It's really hard to tell. It could be that the scheduler is making more processes run in C0 at full clock speed in Jaunty which may produce more power dissipation, yet because it's more efficiently scheduler, will use less power over the long term.

    Also, GCC may be producing more efficient code in kernel and user space, and hence the instruction mix may be causing some subtle changes.

    There are so many factors to consider!