In December of 2008, I asked what you thought about suspending and hibernating Ubuntu Servers. While the "poll" wasn't unanimous, the overwhelming majority of you thought it might actually be useful in some situations.the best way to conserve energy is to go to sleep,
and these days even servers can suspend and resume,
so imagine if we could make it possible to build
a cloud computing facility that drops its energy use
virtually to zero
It's not too early to start looking at this feature for Karmic. So I spent some time last week testing this, and I must say that I'm impressed with the very preliminary results. I was able to install the Ubuntu Jaunty Server on my hardware, both suspend and hibernate the system from the command line, and then remotely resume the system using wake-on-lan.
Impressively, my test system's power consumption is reduced by ~80% while in the suspended state, and can wake in ~5 seconds!
My test hardware is actually a desktop kit system (Asus P1-AH2, AMD x2 5800, 4GB, nVidia), running the Jaunty amd64 server.
At this point, I'm quite interested in gathering any feedback from the Ubuntu Server community on their experience suspending/hibernating/resuming the Jaunty Server on whatever hardware they might have. Here are some detailed instructions...
Server BIOS Setup
Check your BIOS for any relevant settings:
- Make sure that wake-on-lan is enabled. This setting takes a variety of names in different BIOS implementations.
- Make sure that low-power states are enabled (my bios had a setting for "S1 & S3" power states). Again, this may be labeled differently, but should be something along the lines of "Advanced Power Management".
Install Ubuntu Jaunty Server (i386 or amd64).
Install pm-utils and ethtool, both of which are now on the Jaunty Server CD.
- sudo apt-get install pm-utils ethtool
- sudo ethtool -s eth0 wol g
Obtain the MAC address of your server, such that you can send the wake-on-lan magic packet from another system.
- ifconfig eth0 | head -n1 | sed 's/^.*HWaddr //'
- sudo poweroff
- sudo apt-get install wakeonlan
- wakeonlan 00:11:22:33:44:55
Once the server is back up, test suspend. Launch a program to run in the background, to ensure that the resume restored this state. And then run the pm-suspend command
- screen top
(new window in screen-profiles) - sudo pm-suspend
- wakeonlan 00:11:22:33:44:55
- pm-hibernate
- wakeonlan 00:11:22:33:44:55
Automated Testing
Next, I ran the automated test-suspend script developed by Andy Whitcroft on the Ubuntu Kernel team. I sent him a minor patch that tailored it a bit better for server testing. For details, see:
https://wiki.ubuntu.com/KernelTeam/SuspendResumeTesting
wget http://people.ubuntu.com/~apw/suspend-resume/test-suspend
sudo bash test-suspend --full --server
And I recorded my results at:
https://wiki.ubuntu.com/KernelTeam/SuspendResumeTesting/Feedback/Server
noting that this machine (Asus P1-AH2) was running the Ubuntu Server.
Do you have a server running Jaunty? Would you care to share your results?
:-Dustin