22

I've recently started to systematically hibernate my laptop instead of shutting it down.

The main reason I chose to do this is that I use one of my workspace as a highly customized dashboard. It's a bunch of windows spatially arranged in a specific way. Of course, I could do a bunch of startup scripts to get the same effect, but it would take long to do and be difficult to manage.

Another reason is that one of my workspaces is a virtualized Windows OS which takes some time to load.

Are there any drawbacks to systematically hibernating instead of powering down? All I can think of is potential memory leaks, but it doesn't seem to be a problem so far.

3
  • Do you hibernate your laptop to disk or do you suspend it to ram? Sep 22, 2010 at 17:49
  • I don't know what's the default, but I assume it's on disk since I travel with my laptop and it doesn't affect my battery. Sep 22, 2010 at 18:04
  • Just be glad that it works at all on your laptop
    – trampster
    Sep 23, 2010 at 3:49

9 Answers 9

11

There are two different suspent modes:

  • suspend-to-ram - usually just called suspend
  • suspend-to-disk - usually just called hibernate

Suspend-to-disk is usually relatively slow such that on some machines it is just faster to do a real boot.

Suspend-to-ram leaves the RAM powered. Depending on your hardware this may consume very little energy. On most hardware the suspend/wake-up is very fast (1 - 2 seconds) and it does not consume a lot of your battery. For example on my Thinkpad it is no problem to leave it > 10 h in suspend-to-ram.

The only disadvantage of suspend-to-disk I can think of, is that is more difficult to setup with encrypted swap partitions.

Sure, for kernel-upgrades you have to reboot a long running system - but you have to do that in any case. And technologies like ksplice are changing that for a lot of security related patches.

Regarding memory leaks - if you have a memory leak, it is most likely in some bad behaving application and then you can just restart that one application.

I supend-to-ram all the time because it is so convenient to directly restart working where you left - I just reboot for security related kernel upgrades or distribution upgrades. Thus, an 'uptime' of over 100 days on my laptop is nothing special.

3

Pros:

  1. Whatever you were doing prior to hibernation is still there next time you boot.

  2. Hibernation (unlike suspend) uses no power when in hibernation.

Cons:

  1. Hibernation takes longer to boot that a normal start up (but the time savings in having all of your applications running may make this worth while).

  2. The more RAM you use, the longer it takes to hibernate/restore. I used to use hibernation a lot in Jaunty and Karmic but Lucid uses quite a lot more RAM so hibernation takes a long time.

  3. For hibernation to work, you need swap space >= to the amount of RAM in the machine.

4
  • 1
    Hibernation takes longer to boot that a normal start up.. I'm not comfortable with this. Jul 14, 2011 at 19:23
  • What do you mean by 'I'm not comfortable with this'?
    – dv3500ea
    Jul 14, 2011 at 19:46
  • Because I get faster boot if i kept my computer on hibernation because all the programs i kept running not stopped and start they simply paused and kept as a image in RAM Jul 14, 2011 at 19:48
  • That is suspend not hibernate. Suspend is much faster than (re)booting or hibernating but requires a constant power source.
    – dv3500ea
    Jul 14, 2011 at 19:50
2

I suspend my laptop regularly (which hibernates if the battery goes too low) and rarely shut down, the only annoying thing I notice is that if you get a kernel security upgrade you need to reboot the machine to apply it, so there's a convenience/security decision to make there.

When I am at home on my private network I tend to not care and leave it, but when I am travelling on someone else's network I reboot to apply the updates.

2

There is a critical con to suspending in RAM or to disk, though it affects only users with sensitive data.

Suspending (in RAM and even on disk) is advisable in a secure environment, but may be a big issue in case the computer is lost. Data can easily be recovered from RAM. Note that after resuming the suspend to disk, data are again in RAM.

The most critical pieces of data are the passwords and keys, that will allow to recover all other data after a normal login.

Data can be easily recovered from RAM using ieee 1394 which includes a by-design a DMA feature (!) so pluging a smartphone to the computer without loging is enough to get the data.

Then there are more clever ways, like freezing the DRAM (and its data) and pluging it to another device to read it.

See: DMA attack and Freezing DRAM attack.

1

I've never seen a Linux system run out of memory simply because it wasn't rebooted often enough. If you leave a mamory-leaking program running for a long time, it may eat up all your memory, but killing that program will get you back to a responsive system. There's no reason you need to reboot during the normal course of events, except for kernel updates.

1

I havent experienced hibernating slower then usual startup. Maybe mega new computers with fast CPU but still with HDD. Then faster maybe is usual startup then needed to read from swap file- hibernated information. Also if a lot ram hibernation is slower if its used all then all whats in ram is beeing written on hibernation and more is read from swap on start. Hibernation is good couse u can stop working nothing is lost and start compter to immidiatly continue your work. But if speed is mentioned then SSD are fast so using them will make hibernation also fast and theres another technology coming ive read about 3 weeks ago but cant find in google now - New Ram witch will hibernate in Ram. Yes with still all hardware off but somehow information stored like in USB Flash drives. Also about hibernation in http://en.wikipedia.org/wiki/Hibernation_%28computing%29 Power saving

After hibernating, the hardware is completely powered down (just like for a regular shutdown). Therefore a hibernated machine uses no more electrical power than one which is switched off -— modern machines, even if switched off, often consume a little power allowing them to be woken on an alarm timer, by Wake-on-LAN, etc. Hibernation thus allows to save electrical power, while avoiding the work associated with restoring all running programs after shutting down the computer, then switching it back on.

Hibernation is often used on laptops, which commonly have limited battery power available, and can usually be set to happen automatically on a low battery alarm. Most desktops also support hibernation, mainly as a general energy saving measure.

Hardware maintenance

Hibernation is also useful if hardware maintenance must be performed which requires powering down the hardware (e.g. changing the CPU or the Power supply). For servers which need to be started up as quickly as possible after maintenance, hibernating and resuming can be quicker than shutting down, then restarting the server applications, and will allow long-running calculations to resume instead of being restarted.

0

I don't think there are any drawbacks to hibernating.

Check out this HowStuffWorks article for some more information.

1
  • That article only talks about leaving a computer turned on. Hibernate saves the state of the machine to the hard disk and turns it off.
    – dv3500ea
    Sep 22, 2010 at 20:33
0

My machines only get rebooted for kernel updates. If that never happened my machines would constantly be going from Suspended to Unsuspended. Even when traveling - having the machine wakeup in a matter of moments - with all my applications running as I left them - is so much more efficient than having to wait the few moments it takes to boot up, login, launch applications.

0

Another Pro of Hibernating against Suspend is: You can use it during flights, while I guess that suspend is against flight regulation (send me a comment if not).

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .