PowerNap Improvements for Natty

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.

Improvements Overview

  • 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

  • PowerWake is simply a tool that sends WoL packets to an specified IP/Broadcast address to be able to wakeup a server.

 

Additional Tools

  • 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.


The Future

  • 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.
Posted in Planet, Ubuntu | Tagged , , | Leave a comment

UPDATE: Dual External Monitors with Laptop

Currently, I connect my laptop to a 22-inch TV. I do this using HDMI. But, I’m now planning to get two 22-inch LCD monitors. However, I was wondering how can I connect the two external monitors to my laptop to independent screens.

I was reading online that getting a DualHead2Go device would be one of the options (regardless of its resolution restrictions). Does anyone have one of this??

Or, Does anyone know of a USB to VGA (or HDMI) adapter that works out of the box in Ubuntu, and provides a decent resolution for 22 inch LCD’s?

UPDATE: Today, I decided to make a little test with my laptop in the attempt to connect two external monitors to it. (HP dv4t with an nVidia GeForce G 105M). What I simply did is:

First, I connected an external monitor through VGA. I enabled it and disabled the laptop LCD.
Second, I connected a second external monitor through HDMI. The monitor was recognized, I enabled, and it was supposedly enabled. However, there was no video output. The reason is because it was HDMI and I was using the Nouveau driver due to the X breakage in Natty.

So, wondering if this would actually work I decided to try the same in Windows. And you know what? It worked! I didn’t test it throughly though. I just connected two external monitors, one to VGA and one to HDMI (and of course turned of my LCD screen). So, whenever the nVidia/X fix is available in Natty I’ll try the same configuration. I’m pretty sure it will work.

I’m now wondering if this would work with any other computer using Intel video cards?

Posted in Planet, Ubuntu | 7 Responses

UPDATE 2 (Semi-fix): HDMI Issues with Maverick

So, today I tried to connect my laptop to the TV using HDMI. Surprisingly, it does not work correctly. The image in the TV comes for a couple of seconds and then goes again for a few more seconds, and the process repeats. Any ideas of what might be going wrong? (It is not cable cause it works well with Windows). So, I’m guessing it is either the Nvidia graphics driver or some configuration error.

My graphics card is an NVidia Geforce G 105M.

UPDATE: So, a user post a comment here that might be related to the audio output and indeed. Now, the HDMI output works, I can see my screen from the tv, the only issue is that there’s no Audio.

How was it fixed? I Went to System > Preferences > Sound, and  in Profile I selected “Digital Stereo (HDMI) Output” instead of “Analog Stereo Output”. This, however, shows me the screen but there’s no audio from the TV nor from the Laptop Speakers.

UPDATE 2: Well after trying to figure out what is going wrong with this, I finally was able to get sound out of my TV connected to the computer through HDMI. For this I had to unmute a setting using alsamixer. This setting was S/SPDIF 1. So, now I have both, picture and sound coming out of my TV. However, the picture comes *only* when there’s something using the sound cards. i.e.When music player is on. When music is off, the TV screen will be turning off/on constantly, as described above.

Posted in Planet, Ubuntu | 10 Responses

UPDATE: No laptop… No phone…

My plans to work over the holidays were affected because I ended up not having my laptop available. Fortunately for me I got it back few days ago, which means I can now get back to do the Ubuntu related stuff I wanted to do (TestDrive, PowerNap, Update the Cluster Stack to the latest).

However, after getting my laptop back, I dropped my Nexus One into the water…(yeah boomer). Fortunately, it was turned off. I removed the battery, Memory Card, SIM Card, and dry it as fast as I could… I haven’t turned it up yet since I’m waiting for it to dry completely; but, to help with that, I put it into a bowl with rice. It is sitting there for the last couple of days, since rice is supposed to absorb moisture and humidity. Hopefully it works again!

UPDATE: After leaving my N1 to dry for a couple of days in rice, I decided to give it a try today and see if it works… and IT DOES!! Nothing seems to be malfunctioning… I guess I was just lucky then!!

Anyway, good thing is that I had an old phone so I’m not totally incommunicated (Just no twitting, facebook, irc from the phone when I’m not at home… I guess I’ll prolly be suffering from the abstinence syndrome…or not 🙂 ).

Posted in Planet, Ubuntu | 2 Responses

Finally…

Graduated!!! And imagine… 45F in Miami… It was freaking freezing when the pic was taken!!!

Posted in Planet, Ubuntu | 4 Responses

Crazy weekend but finally graduating…

So last Monday I finally finished all the coursework required and officially finished with my Masters in Telecom and Networking. However, it wasn’t as I expected. I wanted to relax for the whole week till my Commencement Ceremony tomorrow but… it wasn’t possible.

I realized that still had lots of stuff to do, but not for school. They were mainly for Ubuntu (Testdrive, powernap, and the cluster stack). However I aslo realized that it was the weekend that I was moving all my stuff to my girlsfriends new apartment. Anyway, unfortunately I couldn’t do all the stuff I wanted but I’m almost done with the moving.

So after the weekend, tomorrow ill hhave the satisfaction to say it’s all over (school), and will have lots of free time till I get a job to work on my Ubuntu related stuff, cause I will be stuck in MIA for the hollidays and wont be coming back to Peru to spend it with the family. But anyways at least I can say I have to do Ubuntu related work.

Posted in Planet, Ubuntu | 2 Responses

TestDrive: Testing an Ubuntu ISO in real Hardware??

So, last month I was reading the “Unity Desktop and maverick backport” thread at the ubuntu-devel list. The discussion at some point became about How to Test Natty (Unity Compiz specifically) in real hardware from early stages in the development cycle. So, Dustin recommended the use of TestDrive to do the testing. However, he also mention that 3D acceleration was not available in the VM’s, and his recommendation was more related to 2D testing.

So, that discussion reminded me of a proposed branch to TestDrive that was outdated, on which an option was added to be able to Launch an ISO from GRUB, by placing the ISO in an special folder, and creating an entry for GRUB’s boot menu. So, today I decided to test that feature! It works, but the code needs improvements. So, before actually working on them, I was wondering what ya’ll think?

So my question is, would it be a good idea to add that option to TestDrive to make an ISO available for booting directly from GRUB for testing in real hardware?, or not? Pros/Cons, Comments, Suggestions?

Posted in Planet, Ubuntu | Tagged , , , | 7 Responses

One more month to Graduate… Still Job searching…

Finally, after a really loooooooong year and a half of having started my studies in the MS of Telecommunications & Networking at Florida International University, I’m about to graduate.

I officially have one more month of class left. This is an exiting time on which I have to decide what’s gonna happen to me in the near future. I’ve been offered the possibility to continue my studies with a PhD in Computer Science, but, I’m not sure just yet what I’m gonna do. However, I’m still job searching.

As I mentioned before, I’m looking for a job in Open SourceNetwork Administration (given to my studies) or Linux System Administration/Engineering, but I’d really like to stay with Open Source, and stay really close to my passion,Ubuntu. Furthermore, I’d also like to continue to work with HA Clustering, loadbalancing, etc, or other technologies, such as Virtualization, Cloud Computing (even though that I might not have much experience, but I’m a quick learner), either on Implementation as a SysAdmin, or as a Developer, as long as it keeps me close to Ubuntu.

Anyways, I just hope things are cleared in the next few days and turn to the better. Wish me luck :).

Posted in Planet, Ubuntu | 2 Responses

UPDATED: Cluster Stack and PowerNap sessions at UDS-N

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.

Posted in Planet, Ubuntu | Tagged , , , , | 1 Response

Florida LoCo Team UDS Host Party

If you haven’t heard yet, the Florida LoCo Team will be hosting a welcoming party for all UDS Attendees.

  • Who – UDS Attendees, Ubuntu Florida Team, and Guests
  • What – Pizza and a Movie night
  • When – October 25th from 7:00 – 10:00/10:30
  • Where – Grand Sierra D, the Plenary room.
  • Why – We would like to welcome everyone to Florida!

Please REGISTER your attendance HERE ASAP. Thank you!!

Posted in Planet, Ubuntu | 1 Response