After the success of the improvements of PowerNap in Ubuntu Natty 11.04, we will be having another session st UDS-O Thursday the 12th at 15:00. In this session we will discuss the following:
- Second Stage action when running in PowerSave mode.
- Support for port-ranges in Network Monitors
- Changing the polling monitoring system to an event based system.
- Client/Server approach to monitor/manage PowerNap “client machines” over the network for data center wide deployments
- Server ARP network Monitoring for Automatic Wake-up of Clients.
- API like approach for Integration with other projects.
Everyone who’s interested are more than welcome to join! For more information, the blueprint can be found HERE.
For all of those who don’t know, “PowerNap is a screen saver for servers except it doesn’t save your screen, it saves the environment and lowers your energy bill.” Dustin Kirkland :). PowerNap was originally created by Dustin to be integrated with (UEC), but it has been extended for Home use. Originally, it put to sleep machines (suspend, hibernate, poweroff) when a list of Processes were not found in the process table for a determined period of time. However, during the Natty cycle improvements were made. So, PowerNap now puts to sleep (suspend, poweroff, powersave) machines that are tagged as underutilized by a set if Monitors.
- PowerNap, has a set of Monitors to be able to detect activity within the server and determine if it is idled or not. If it is, PowerNap will execute an ACTION. Administrators can chose what monitors to enable/disable. These are:
- ProcessMonitor: Looks for a process in the process table.
- IOMonitor: Monitors IO activity by process name.
- InputMonitor: Monitors Mouse/Keyboard input activity connected to USB.
- LoadMonitor: Monitors a server load threshold.
- TCPMonitor: Monitors active TCP connections (i.e. SSH).
- UDPMonitor: Monitors activity received in any user defined UDP port.
- WoLMonitor: Monitors WoL packets on ports 7 and/or 9.
- ConsoleMonitor: Monitors console activity.
- The process starts when PowerNap begins monitoring for an ABSENT_PERIOD (i.e. 300secs). If within that period no activity has been detected, then PowerNap executes an ACTION.
- Before the ACTION is taken, PowerNap enters to the GRACE_PERIOD (I.e 30 seconds), notifying the user that the ACTION will be taken in GRACE_PERIOD amount of seconds. (i.e. On second 270 PowerNap will notifies its users and the period between 270 and 300 seconds is known as GRACE_PERIOD).
- The possible ACTIONS are:
- Best-effort – Automatically decide between a user defined action or any of the other methods listed below (these methods rely on pm-utils)
- Suspend (Command: pm-suspend)
- Hibernate (Command: pm-hibernate)
- Poweroff (Command: poweroff)
- Powersave – Newly added method that reduces the Power Consumption (Command: pm-powersave)
- The PowerSave method executes a set of scripts both provided by pm-utils and PowerNap. These scripts have the objective to reduce the power consumption of the machine by turning off hardware capabilities or tuning the OS. It is possible to provide any custom script as well as chose which to enable or disable. Examples of these scripts are:
- Turn off all the CPU cores except of one.
- Reduce the cores frequency to the lowest possible.
- Disable WoL from Network Cards.
- Change the NIC speed from 1Gbps to 100Mbps.
- Turn off USB ports.
- Disable HAL polling.
- Now, when the PowerSave ACTION is taken, the machine keeps running in a lower power state. PowerNap keeps Monitoring until activity is detected. Once any of the Monitors detects activity, the PowerSave action is reverted.
- PowerWake is simply a tool that sends WoL packets to an specified IP/Broadcast address to be able to wakeup a server.
- powernap-now: Sends a signal to the PowerNap daemon to execute the ACTION regardless of the state of the monitors.
- powerwake-now: Sends a signal to the PowerNap daemon to wakeup during the PowerSave mode.
- Note that these commands have to be executed in the machine running PowerNap. If this needs to be done through the network, then the command will have to be sent remotely to be executed in the machine.
- Second Stage Action: Second Stage Action when entered into PowerSave mode. (i.e. Suspend after 2 hours after running in PowerSave mode).
- Client/Server Model: The main Idea is to create a powerwaked Server that tracks all the machines using PowerNap in the network and is able to schedule wakeups, upstates, etc, etc.
At UDS-N (Natty) I’ll be leading these two sessions:
- Cluster Stack for Natty
The Cluster stack session will be divided in two main parts. The first part we will discuss the current status of the Cluster Stack in Ubuntu, things that have been and haven’t been achieved so far, as well as the features we would like to see in the future. The second part of the session will be concentrated in the integration of the Cluster Stack with the Ubuntu Enterprise Cloud (UEC).
The outcome of the discussion is:
- Merge library split changes for cluster-glue, pacemaker from debian packages.
- Complete MIR requests to finally get packages into Main.
- Improve documentation, and add it to the Ubuntu Server Guide.
- Docs: HA Apache2, HA MySQL, CLVM, Recommend a Cluster FS – OCFS2, Fecing, etc.
- Automated Deployment (Look into deploying with puppet.).
- Simple: Join a simple cluster/Virtual IP.
- Advanced: CLVM, DRBD, Filesystems.
- Meta-packages / Tasksel to install and join a Cluster.
- HA for UEC.
- Continue with the research on HA for CLC, Walrus, CC, SC
- Eventually, write OCF RA’s for above components.
- Investigate on providing HA *inside* the Cloud.
- PowerNap Improvements
PowerNap is a power management tool, created by Dustin Kirkland, that has been integrated with the Ubuntu Enterprise Cloud. However, this sessions we will discuss how to extend the functionality of PowerNap to make it available for other kinds of environments, as well as providing alternative methods of power savings for Servers.
The outcome of the discussion is:
- Investigate how PowerNap could tap into Upstart to monitor processes in an event driven manner rather than polling /proc.
- Use pm-powersave for PowerNap new power save mode.
- Contribute any new actions to pm-utils (rather keeping in PowerNap)
- Use event based monitoring for input polling (limited to keyboard and mouse)
- Get network monitor matching the MAC in the WoL.
- Provide a powerwaked to track machines registered and be able to schedule poweroff’s/updates.
If you would like to know more and you are not attending to UDS personally, you can still participate remotely. Or, you can just show up at the session. I hope to see there anyone who’s interested.