PowerNAP Improvements

Registered by Andres Rodriguez

PowerNAP currently hibernates, suspends, or powers off servers given on the status of given processes in a range of time.

PowerNAP improvements include adding support to perform various actions get servers to lowest power state possible without suspending/hibernating/powering off; Adding support to monitor services status to perform actions, instead of just monitoring the process table; Extend the functionality to provide a similar feature of what is done with UEC; Provide PowerWake with other waking up methods such as IPMI.

Blueprint information

Robbie Williamson
Andres Rodriguez
Andres Rodriguez
Series goal:
Accepted for natty
Milestone target:
milestone icon natty-alpha-2
Started by
Robbie Williamson
Completed by
Robbie Williamson

Related branches



Work Items alpha2:
[andreserl] Write scripts to lower power consumption: DONE
[andreserl] Add PowerSave mode. Use pm-powersave for it: DONE
[andreserl] Provide method to select different type of action methods (best_effort, suspend, hibernate, poweroff, powersave): DONE
[andreserl] Provide method to listen for a WoL packet and wakeup when in PowerSave mode: DONE
[andreserl] Create powernap-action command to enable/disable/list scripts: DONE
[kirkland] Release new PowerNap: DONE
[andreserl] Define a method to instance monitors in an easy fashion: DONE
[andreserl] Define a method to integrate monitors into PowerNap: DONE
[andreserl] Review and Integrate ProcessMonitor with new test method: DONE
[andreserl] Review and Integrate RemoteMonitor with new test method: DONE
[andreserl] Review and Integrate IOMonitor with new test method: DONE
[andreserl] Review and Integrate InputMonitor with new test method: DONE
[andreserl] Integrate Method/Monitors to PowerNap itself: DONE
[andreserl] Update packaging to install new files: DONE
[andreserl] Create powernap-action manpage and Update the others: DONE
[kirkland] Release PowerNap: DONE
[andreserl] Change default ACTION_METHOD to be pm-powersave: DONE
[andreserl] Rename RemoteMonitor to UDPMonitor: DONE
[andreserl] Create WOLMomitor based on powernapd's monitor: DONE
[andreserl] Create PS2Monitor based on get_console_activity from powernapd: DONE
[kirkland] Create TCPMonitor: DONE
[kirkland] Create LoadMonitor: DONE
[andreserl] Change GRACE_PERIOD approach: DONE
[andreserl] Enable all Monitors to run at all times (specifically when on PowerSave mode): DONE
[andreserl] Separate WoL monitor from powernapd: DONE
[andreserl] Separate Console Monitor from powernapd: DONE
[andreserl] Enable WOL Monitor to listen in power 7 and 9 by default: DONE
[andreserl] Enable Console Monitor by default: DONE
[andreserl] Update documentation: DONE
[kirkland] Release new PowerNap: DONE

work items for alpha-3:
Contribute action scripts to pm-utils: POSTPONED
Provide logging for new files added: POSTPONED
Provide powerwaked method to schedule wakeups and powersave features: POSTPONED
Investigate how the ProcessMonitor can tap into Upstart for monitoring instead of looking in the process table: POSTPONED
Investigate [1] for ProcessMonitor aswell: POSTPONED
Provide powerwaked to check status of registered machines in a Client/Server fashion: POSTPONED
Provide powernapd with a method to listen messages from powerwaked: POSTPONED

== Discussion of new features (Jan 22, 2011) ==

As per discussion with Dustin, we are targetting new features for natty-alpha3. This features are detailed above. Previous work items for natty-alpha3 will still targeted for this milestone, though they can be retargetted for a later milestone.

[1]: http://lwn.net/Articles/157150/

1. As per discussed with Dustin, a method to execute various actions to bring servers to the lowest power states without having to suspend/hibernate/power off is required. This involves using various hacks and tricks to fulfill the objectives. Examples of these hacks and tricks are:
- Turn off 15 out of 16 cores.
- Spin down hard drives.
- Turn off hardware that's not required to be running.
- Reduce CPU frequency to the lowest possible.
- etc

2. Also, as per discussed with Dustin, instead of monitoring the process table, it might also be a good idea to monitor various services, such as load in webserver, connections in databases, etc, and according to that, bring the server to the lowest power state possible.

3. Provide any other waking up methods for PowerWake, such as IPMI.

4. Given that PowerNAP is integrated in the cloud, it would be nice to improve PowerNAP in such a way that will also be used in other kind of clustered environments, or in a set of servers were traffic is monitored. For example, in a loadbalanced webserver cluster, sometimes there;s not enough traffic that will involve all the webservers to be up. PowerNAP can be extended in such a way that it will do the same that is done with UEC when servers are idled, or when the load is not too much that will involve having lots of servers running.

5. Obtain feedback from community is also desired to be able to extend PowerNAP uses.

== Session Notes ==

 - Open all input devices and poll/monitor activity
 - Look at udev for all input devices, look for id-input-key and mouse
 - see pm-utils fpm-powersave (Does something similar)
 - look at using poll(2,3) to monitor input
 - investigate getting kernel events on new processes (rather than polling) -- perhaps upstart?
 - check upstart for notification of new processes
 - actions should be added to pm-utils package (such as powering down cores)

== Outcome ==
 * ACTION: Talk to Scott about Upstart, how PowerNap could tap into Upstart to monitor processes in an event driven manner rather than polling /proc
 * ACTION: Use pm-powersave for PowerNap new power save mode
 * ACTION: Contribute any new actions to pm-utils (rather keeping in PowerNap)
 * ACTION: Use event based monitoring for input polling (limited to keyboard and mouse)
 * ACTION: Get network monitor matching the MAC in the WoL


Work Items

This blueprint contains Public information 
Everyone can see this information.