From the Canyon Edge -- :-Dustin

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.

Server suspend might be useful for faster power-on and hot spare backup servers.

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 ;-)

:-Dustin

18 comments:

  1. 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 :(

    ReplyDelete
  2. 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.

    ReplyDelete
  3. It would be useful for workload management and job scheduling too-- if you have a pool of worker machines, the job scheduler can put the idle machines to sleep when they're not doing anything.

    ReplyDelete
  4. 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.

    ReplyDelete
  5. 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.

    ReplyDelete
  6. I also see a use for this, for my senior project I worked on this:
    https://launchpad.net/demandresponse

    It would have been much more useful if servers could have been resumed quickly.

    ReplyDelete
  7. 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 :)

    ReplyDelete
  8. 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.

    ReplyDelete
  9. 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.

    ReplyDelete
  10. 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.

    ReplyDelete
  11. I can see this as useful for cloud computing - adding additional servers during peak times and saving energy during periods of low demand.

    It could also be handy to hibernate servers when they need to be physically moved. Although this is an uncommon case.

    I think it is a cool idea, but I think faster boot times may make this less useful then it might otherwise be.

    ReplyDelete
  12. If I had a vote, it'd be towards not putting the effort in now. It's not something I could see myself using (I know, famous last words).

    ReplyDelete
  13. 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.

    ReplyDelete
  14. 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.

    ReplyDelete
  15. 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.

    ReplyDelete
  16. 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.

    ReplyDelete
  17. 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.

    ReplyDelete
  18. Well doing that is kinda easy in Ubuntu....

    Just create a daily cronjob (23:55) that reads;
    sh -c 'echo "$(date --date=tomorrow +%Y-%m-%d) 07:00:00" > /proc/acpi/alarm' && /sbin/shutdown -h -P +5

    Fiddle around in the acpi functions of your bios, usually disabling or enabling the wake on alarm.

    I made shure bios time is always local time & tat the OS calculates de wakeuptime.

    Regards,
    ed{at}omts{dot}be

    ReplyDelete

Please do not use blog comments for support requests! Blog comments do not scale well to this effect.

Instead, please use Launchpad for Bugs and StackExchange for Questions.
* bugs.launchpad.net
* stackexchange.com

Thanks,
:-Dustin

Printfriendly