From Fedora Project Wiki
No edit summary
No edit summary
Line 7: Line 7:
* Phil Knirsch (Lead, tuned, documentation)
* Phil Knirsch (Lead, tuned, documentation)
* Jiri Skala (BLTK packager)
* Jiri Skala (BLTK packager)
* Marcela Maslanova (initscript/udev service start/stop automation)


== Current status ==
== Current status ==
* Targeted release: [Fedora 11]  
* Targeted release: [Fedora 11]  
* Last updated: (12/12/08)
* Last updated: (02/02/09)
* Percentage of completion: 0%
* Percentage of completion: 15%


== Detailed Description ==
== Detailed Description ==
Line 27: Line 28:
* Enable relatime for filesystem by default during installation
* Enable relatime for filesystem by default during installation
* Write a monitoring and tuning daemon that adapts system settings to the current use
* Write a monitoring and tuning daemon that adapts system settings to the current use
** http://fedorapeople.org/gitweb?p=pknirsch/public_git/tuned.git;a=summary
* Review services and make a framework that will allow services to start depending on installed hardware or software
* Review services and make a framework that will allow services to start depending on installed hardware or software
* Provide scripts and documentation to perform an individual review of a system and tips & tricks on how to improve it
* Provide scripts and documentation to perform an individual review of a system and tips & tricks on how to improve it
** http://fedorapeople.org/gitweb?p=pknirsch/public_git/tuned.git;a=summary


== Test Plan ==
== Test Plan ==
Line 46: Line 49:


== Documentation ==
== Documentation ==
TBW
 
=== Simple user tips for improving power usage ===
* Enforce turning of machines that are not used (e.g. company policy)
* Turn of unused hardware already in BIOS.
* Disable power hungry features.
* Enable CPU scaling if supported for ondemand CPU governor. DONT use powersave governor, typically uses more power than ondemand
(race to idle).
* Put network card to 100 mbit/10 mbit:
** 10 mbit: ethtool -s eth0 advertise 0x002
** 100 mbit: ethtool -s eth0 advertise 0x008
** Doesn't work for every card
* Put harddisk to spindown fast and full power saving:
** hdparm -S240 /dev/sda (20m idle to spindown)
** hdparm -B1 /dev/sda (Max powersave mode)
* Make sure writes to hd don't wake it up too quickly:
** Set flusing to once every hour
** echo "360000" > /proc/sys/vm/dirty_writeback_centisecs
** Enable laptop mode
** echo "1" > /proc/sys/vm/laptop_mode
* Screensaver needs to dpms off the screen, not just make colors black.  To turn of monitor after 120s when X is running:
** xset dpms 0 0 120
 
=== Simple programmer tips for improving power usage ===
* Wake up only when necessary
* No poll() calls
* If you wake up, do everything at once (race to idle)
* Use large buffers to avoid frequent disk access. Write one large block at a time
* Don't use [f]sync() if not necessary
* Group timers accross applications if possible (even systems)
 


== Release Notes ==
== Release Notes ==

Revision as of 13:30, 2 February 2009

Power Management improvements

Summary

Improve the current state of power management, especially in regard to userland.

Owner

  • Phil Knirsch (Lead, tuned, documentation)
  • Jiri Skala (BLTK packager)
  • Marcela Maslanova (initscript/udev service start/stop automation)

Current status

  • Targeted release: [Fedora 11]
  • Last updated: (02/02/09)
  • Percentage of completion: 15%

Detailed Description

Power management and power saving in Fedora has been a topic is special areas over the last few releases. Using powertop especially for Fedora 9 quite a few improvements were already done, but there is still lots of things that haven't been touched in regard to power saving.

Benefit to Fedora

Simple: On average use less power for turned on machines while not affecting user experience (a lot ;)).

Scope

  • Review and fix behaviour of typical applications in a full installed Fedora in regard to:
    • CPU wakeups
    • Disk IO
    • Network IO
  • Add a workload measurement package to Fedora (BLTK adapted to Fedora use case)
  • Enable relatime for filesystem by default during installation
  • Write a monitoring and tuning daemon that adapts system settings to the current use
  • Review services and make a framework that will allow services to start depending on installed hardware or software
  • Provide scripts and documentation to perform an individual review of a system and tips & tricks on how to improve it

Test Plan

  1. Run Fedora 10 and, measure the the power usage for 1 day
  2. Run Fedora 11 on the same hardware and compare the power usage over 1 day with Fedora 10

User Experience

As power saving is not really visible without a measuring it the effects will not be directly visible. So in order to really see the effect you'll either need a laptop and run that on battery power or a wattmeter that is hooked between your system and the power line.


Dependencies

Anaconda changes (for relatime) Fixes need to get included to have an effect (really ;)).

Contingency Plan

Make sure none of the more aggressive power saving features breaks on common hardware and back it out it case it does.

Documentation

Simple user tips for improving power usage

  • Enforce turning of machines that are not used (e.g. company policy)
  • Turn of unused hardware already in BIOS.
  • Disable power hungry features.
  • Enable CPU scaling if supported for ondemand CPU governor. DONT use powersave governor, typically uses more power than ondemand

(race to idle).

  • Put network card to 100 mbit/10 mbit:
    • 10 mbit: ethtool -s eth0 advertise 0x002
    • 100 mbit: ethtool -s eth0 advertise 0x008
    • Doesn't work for every card
  • Put harddisk to spindown fast and full power saving:
    • hdparm -S240 /dev/sda (20m idle to spindown)
    • hdparm -B1 /dev/sda (Max powersave mode)
  • Make sure writes to hd don't wake it up too quickly:
    • Set flusing to once every hour
    • echo "360000" > /proc/sys/vm/dirty_writeback_centisecs
    • Enable laptop mode
    • echo "1" > /proc/sys/vm/laptop_mode
  • Screensaver needs to dpms off the screen, not just make colors black. To turn of monitor after 120s when X is running:
    • xset dpms 0 0 120

Simple programmer tips for improving power usage

  • Wake up only when necessary
  • No poll() calls
  • If you wake up, do everything at once (race to idle)
  • Use large buffers to avoid frequent disk access. Write one large block at a time
  • Don't use [f]sync() if not necessary
  • Group timers accross applications if possible (even systems)


Release Notes

Users of Fedora 11 should be able to see some reduction in power usage of their systems.