Wednesday, December 10, 2008

Ubuntu Server: Suspend/Hibernate for Jaunty?

We spent an hour yesterday at the Ubuntu Developer Summit discussing the potential of suspending, hibernating, and resuming an Ubuntu server.

The Ubuntu Desktop has gotten really good at suspend/hibernate/resume. I think I've suspended/resumed my laptop 30 times already at UDS. Woohoo!

With Ubuntu virtual machines, we have a couple of ways to "suspend" or "hibernate" at the hypervisor level, with pausing, and snapshotting.

I'm suggesting that we close the gap and attempt to support hibernate and/or suspend in the Ubuntu Server OS.

Radical? Perhaps... A number of people noted that, "No one hibernates or suspends a server." But that's what's so attractive about it to me.

On the positive side, the frameworks have been established already on the Desktop side. The pm-utils package provides command-line utilities to enter into the lower power states. Most i386 and amd64 server hardware is remarkably similar to laptop/desktop hardware from an ACPI perspective.

On the negative side, much server hardware (think PCI devices) have never been tested for suspend/hibernate and resume. We would additionally need something like wake-on-lan, open-ipmi, or nut to remotely send the "wake up" signal.

Okay so the use cases... We came up for a couple, but I'm certainly looking for more.

Server hibernation might be useful for offline hardware maintenance, migration of installations from real hardware to virtual machines, and migration from virtual machines to real hardware.

Either way, such a feature would allow an administrator to bring Ubuntu servers running on real hardware down to low-power states, and resume back to a running system and restore the previous context. We discussed build servers and DNS servers as potential candidates, in that these systems build a cache of valuable data into memory over time--to reboot or shutdown is to clear memory and loose the "optimal performance" state.

I suspect you might have some other server scenarios that could potentially benefit from hibernate/suspend/resume... If so, I would love to hear from you in the comments below. Or, if you would rather, you can join the ranks that are calling me crazy for even proposing this ;-)

18 comments:

Sorry but this is not at all the type of features I'd like ubuntu server people to work on... much, much higher priorities in my opinion... I hope this isn't what came out of the recent ubuntu server survey :(

Just for the record, before modprobe and modules, everybody thought that dynamically loadable modules were a bad idea, because "who will plug in new hardware in a server... furthermore, while it runs ?!?!".

You're right, it's not because nobody does it actually that it would'nt be a good idea.

I had just thought about looking into making a file server that could go to sleep when nothing was needed from it and could quickly wake up otherwise. I can definitely see the benefit of having better power management for Ubuntu Server.

This would be interesting for me just for saving energy. After my office closes, the server is untouched and has nothing to do until 9 AM of the next day. More than 12 hours doing nothing. A dynamick way of puting it to sleep and waking up automatically would be great.

It may be useful for LTSP labs in our local schools, where the schools want to conserve power overnight. Currently they shut down and start up the LTSP server every day. It would be much better if it had some kind of auto-suspend, auto-resume feature. I don't know if the auto-resume is possible though, but there's a use-case for you :)

For servers that are not used overnight it could a very usefull. Especially when it can resume automatically. For example, why should a file server run overnight when nobody is in the office and nobody can access it? when it can be accessed, it will no be done all the time, and it can be automatically resume.

this is not at all crazy. The hot spare use-case is a really good one, as is an overnight snooze. especially when combined with wake-on-lan. If servers go to sleep at night, saving energy and then wake up as soon as someone tries to use them that would be a big benefit with the only cost being a somewhat slow initial response to the first user to wake them up. Some server applications such as Lotus Domino do housekeeping tasks in the middle of the night (without using cron) so this needs to be configurable.

To make it work reliably it would probably require an huge effort in terms of development & testing, while only few will benefit from it. Cause though I am intrigued by your use cases, my guess is that 99.99% of the servers (I work for a hosting company with >20k servers) will never make use of it. I can't stop thinking that investment would be spent better in lower hanging fruits like improving frequency scaling or visualization.

In my area of development SAS(Software as a Service) is gaining popularity. The ability to bill for only the software services that are consummed instead of a flat rate saves the customer money. In this case being able to suspend your hardware, when not in use or some other scenario, and possibly re-purpose it later could have merit.

In my area of development SAS(Software as a Service) is gaining popularity. The ability to bill for only the software services that are consummed instead of a flat rate saves the customer money. In this case being able to suspend your hardware, when not in use or some other scenario, and possibly re-purpose it later could have merit.

To me this would be incredibly useful. I work for a very large network equipment maker, and in many of our test labs we have racks of servers providing all sorts of functions, from fileservers to machine that run emulations of the router/switch operating systems. Many of these servers have very "lumpy" usage patterns: they may be used almost constantly for a week when someone is testing something, but then they may go several days and not so much as get touched. Having the ability to suspend and *quickly* resume operation (where quickly is something like, let's say, less than 10 seconds would mean a non-trivial energy savings, as well as probably extending the life of the servers. Combined with some type of wake-on-lan I can see this as being extremely beneficial -- power is expensive and so is the air-con to keep those rooms cold. With suspend for servers, we save on both sides.

I think it would be useful. I run an Ubuntu 8.10 print server at home. I'd love for it to be consuming little or no power when not printing (ie when I am asleep, at work, etc). This would further the philosphy of Green IT.

Yeah, I too am looking to conserve power on my home server, when it might spend more than 18-20 hours every day doing nothing. I've already checked out the WOL options using magic packets, and in principle this will work, but it's not very transparent for the very non-technical members of my family.

I'd love for them to simply be able to begin the process of saving or opening a file on the server, and have it auto-wake, and then after a period of inactivity, simply return to sleep again, until the next time.

Printfriendly

About the Author

Previously, Dustin was the VP of Product at Canonical, having led the amazing team that delivers Ubuntu, from the Cloud to IoT commercial offerings.

Formerly the CTO of Gazzang, a venture funded start-up acquired by Cloudera, Dustin designed and implemented a key management system for cloud applications, called zTrustee, and delivered comprehensive security for cloud and big data platforms with eCryptfsand other encryption technologies.