67

I've never quite understood the original purpose of the Hibernation power state in Windows. I understand how it works, what processes take place, and what happens when you boot back up from Hibernate, but I've never truly understood why it's used.

With today's technology, most notably with SSDs, RAM and CPUs becoming faster and faster, a cold boot on a clean/efficient Windows installation can be pretty fast (for some people, mere seconds from pushing the power button). Standby is even faster, sometimes instantaneous. Even SATA drives from 5-6 years ago can accomplish these fast boot times.

Hibernation seems pointless to me when modern technology is considered, but perhaps there are applications that I'm not considering.

What was the original purpose behind hibernation, and why do people still use it?


Edit:

I rescind my comment about hibernation being obsolete, as it obviously has very practical applications to laptops and mobile PCs, considering the power restrictions. I was mostly referring to hibernation being used on a desktop.

20 Answers20

142

Because it saves the status of all running programs. I leave all my programs open and can resume working the next day very easily.

Doing a real boot would require to start all programs again, load all the same files into those programs, get to the same place that I was at before, and put all my windows in exactly the same place.

Hibernating saves a lot of work pulling these things back up again.

David
  • 9,854
111

Normally hibernate mode saves your computer's memory, this includes for example open documents and running applications, to your hard disk and shuts down the computer, it uses zero power. Once the computer is powered back on, it will resume everything where you left off.

You can use this mode if you won't be using the laptop/desktop for an extended period of time, and you don't want to close your documents.

Simple Usage And Purpose: Save electric power and resuming of documents. In simple terms this comment serves nice e.g (i.e. you will sleep but your memories are still present).

Why it's used:

Let me describe one sample scenario. Imagine your battery is low on power in your laptop, and you are working on important projects on your machine. You can switch to hibernate mode – it will result your documents being saved, and when you power on, the actual state of application gets restored. Its main usage is like an emergency shutdown with an auto-resume of your documents.

33

Hibernation preserves the current system state, and lets you power down completely. Yes, you can boot in mere seconds, but how long will it take you to get your web browser, word processor, chat client, music player, etc. etc. etc. up after that? With hibernation, no time at all.

21

Firstly, not everything is on SSD. I'm on a laptop right now with no SSD, and I hibernate all the time.

Secondly, hibernation preserves the full memory state (more or less). If you have a running process that you do not wish to close, hibernation is the way to go.

There have been a couple of times when I have had to pack up my laptop when there still is a running process. This is especially necessary when I'm running CPU-intensive programs like Mathematica or a compilation because putting the laptop inside a bag is one way to overheat it. Hibernation is the best thing to do here.

For desktop PCs, yes, hibernation makes less sense as you can still sleep/suspend and achieve the same effect. However, the need for hibernation on a desktop is -o different than the need for hibernation years ago. Booting up may be faster, but the standard boot doesn't give you back all your open programs. Sleep/Suspend/Hibernate do, and which one you want to use depends on whether or not you trust your power supply on a desktop. And in many cases, you can't -- I live in a city where there are scheduled power cuts every day in some parts of the suburbs.

The only thing modern technology gives us when it comes to hibernation is the ability to just shut down a computer when we aren't concerned about the running programs and restart with the same/similar speed as hibernation.

Manishearth
  • 1,206
17

For quick shutdowns during power outages...

UPS signals power out, machine checks battery level, saves system state to disk so it comes back exactly as prior to the power outage.

Otherwise shutdown can take too long to process, open programs don't always have clean shutdown from system initiated close and will damage or lose unsaved open documents.

Standby flat out doesn't do any of that...

Fiasco Labs
  • 6,864
14

Hibernation is the only way to turn off a computer completely and later, turn it on and get back the exact same state when you left it.

It has nothing to do with battery or laptop or boot time saver, ssd, new technology, old times and original purpose. The purpose has never changed. The way people use their computer nowadays don't change this.

Edit: for more details:

Since the computer has to get back to its previous state, it has to save it somewhere.

That's the purpose of the "hiberfil.sys" file on the hard drive. (We are talking windows OS)

This way it can save all the content of the RAM on the hard drive. Hibernation can be activated or deactivated. When activated, hiberfil.sys is created. (I haven't tried to see if it's deleted when turning hibernation off)

So one thing worth remember is that you will lose disk space when you use hibernation. By default, the hiberfil.sys file will have 75% the size of the RAM. Example: if you have 8 GB of ram, you will "lose" +-6 GB of Rom of your hard drive.

But its size can be configured (up to 100% of RAM). If you want to know more about it, here is a link from Microsoft: http://msdn.microsoft.com/en-us/library/windows/hardware/gg463229.aspx

Kev
  • 272
11

I use hibernation all the time, as it saves my workflow. I detest rebooting because I have to re-think, where I left off from the previous day. At the end of the day I'll add what you might call a placeholder on my system, usually in Visual Studio or notepad. So after arising out of hibernation this is immediately presented, thus giving me a much needed memory jolt - especially useful when it's 9am and in need of coffee.

Visual Studio reminder!

Other people may use sticky notes plastered onto their screens, or read entries in their daily log. Whatever works for you. For me, my workflow is spread across numerous applications; Firefox, Visual Studio, Outlook, Windows Event Log, Microsoft SQL Management Studio, LINQPad, iPlayer, Greenshot, Notepad, and PowerShell. I'll reboot when forced by Windows Update, but otherwise I'd rather be productive. Just hibernate, take your laptop home, and not worry about the power as you would if it was sleeping.

wonea
  • 1,877
10

Hibernation is targeted at the mobile business market where efficient use of battery power is necessary. Hibernation, while slow, draws almost no power. Standby, on the other hand, can still draws a surprising amount of battery.

When using a laptop on battery, hibernation can become especially useful when you know you are not going to be using it for awhile. The reason is threefold.

1) Standby still draws power that can add up to a large percentage of your battery if left for extended periods. Estimates vary on the power difference, and there could be significant differences depending on the PC. I'll edit should I find a power consumption comparison chart.

2) Applications can wake a PC from Standby without user interaction. Common examples are Windows Update, "background" virus or system scans or other background tasks. This creates an issue where you laptop has suddenly increased its power-consumption (without user consent) and is unlikely to return to standby upon task completion. This then kills your battery.

3) Should a PC wake from standby without user interaction, it could wake in an environment that is not PC-friendly, such as a sealed and insulated carrying case. This could quickly damage computer components should the computer heat up.

EDIT: Hibernation on a desktop makes little or no difference. The difference in power drain between hibernation/standby makes standby the obvious choice when a constant power source is available. The exception would be if you lived in an area when power outages are frequent and you don't want data loss.

Usta
  • 614
  • 2
  • 9
  • 22
9

I want to concentrate more on the technical aspects. You have to distinguish between Sleep and Hibernate. Both allow you to resume your work in a short amount of time, but both have different features and thus allow for different usage scenarios. Both allow you to resume work in a relatively short amount of time.

Sleep

When your computer is sent to sleep, the majority of components of your computer are powered down. The memory is still being powered though, saving the state of your operating system for a quick resume. Running out of battery on a laptop or losing power otherwise will lose your session and unsaved work. There have also been cases where this damaged/destroyed the operating system. Due to this danger, this should probably only used on laptops supported by batteries or desktop computers hooked up to a UPS.

Hibernation

Hibernation saves the content of your memory to your hard drive, allowing the computer to be completely powered down and thus not wasting any energy. It also allows you to resume work at a different place, for example if you move your desktop computer to a new location or if you don't use a battery for your laptop. Since the memory content has to be read back into memory upon boot, getting the system back up and running takes longer than getting it out of sleep which is almost instantaneously.

Hibernation makes sense for people who have a lot of work going on that either can't be saved due to external circumstances or whose work setup is rather complex so that setting it up again would take an enormous amount of time. This can apply to laptop but probably mostly desktop users, since laptop users could also use sleep mode in conjunction with the laptop's battery. So hibernation makes especially sense for desktop computers which usually don't have an electric life line in form of batteries in case of a power outage.

Apparently, as is obvious from the other answers, people also use it to serve their laziness thinking it is actually a faster way of booting. I agree with the author of this question that in the days of SSDs and ever improving operating systems hibernation for such people doesn't really make sense. After all, there are benefits to rebooting such as flushing the memory to clear out memory leaks, removing rogue processes and whatnot. Saving the occasional seconds by using hibernation without a good reason will probably have detrimental effects if used over longer times.

Zerobinary99
  • 1,801
  • 3
  • 14
  • 18
6

Not everyone is using SSD. The SSD usage is still much less than HDD at this point of time.

And even in the case of using SSD, when people are doing something and then they need to shutdown the computer while leaving the opening programs' state as-is, there's no solution other than hibernation.

phuclv
  • 30,396
  • 15
  • 136
  • 260
6

I user hibernation on my desktop PC at work at the end of each day and only power it down completely over weekends. While it may not take a long time to get to the login prompt it takes a bit more time to start up the PC and all the programs I need and load in the projects I was working with. Both Visual Studio and Eclipse takes a while to load and then the projects take a bit more. Then the anti-virus needs to load before I can start doing anything and I also like to start up Outlook and it also takes a while. With hibernation I can switch on the computer and get to work almost instantly.

liftarn
  • 141
4

Hibernate allows you to unplug your PC from the outlet temporarily. Suppose you need to migrate to another place or inject the power meter between the outlet and your PC

enter image description here

You need to unplug the power cable first. Try doing that with sleep mode (which needs some power to sustain the RAM, I believe).

Furthermore, since you can see that Hibernate does not need any power to keep the state,

  1. It saves you more bills (and environment) that simple sleep,
  2. Hibertante is safer during night outages,
Val
  • 6,535
4

Basically, for "sleep" mode, the computer turns off disk drives, displays, etc, and copies "state" out of power-hungry components into RAM (the last "power-hungry" component being the CPU itself). The RAM is then "kept alive" with a low-frequency refresh, and when something triggers the CPU to awaken it puts everything back where it belongs.

For hibernate most of the above occurs (plus any additional "state" is saved that was not saved above) and then the RAM image is written to "disk" (ie, persistent storage), as one big "file" (though on a reserved location in disk). At this point there is no "state" in the machine that is not represented by the RAM image on disk and the computer can be completely powered off. When the CPU is powered back on it checks for a RAM image on disk, and if there is one (and there's been no subsequent "boot") the image is read back into RAM and the system essentially restarts as if from sleep.

4

As someone who works in IT in a corporate environment, with computers that are managed by Windows group policy, hibernate can cut down our boot time to 1/4 or less of what it would be to do a clean startup. Most of the management tasks that happen during boot don't need to happen during wake from hibernation. Of course, in our environment, we periodically reboot to catch updates and other config changes, but we can do that at our convenience such as over lunch breaks.

Plus in the environment we're in, we use self-encrypting hard drives as a security measure, and the ones we use are still spinning disks so we can't benefit from SSD speed yet, and may not for some time.

Doing a clean boot-up every time you turn the computer on also wastes more power than hibernate, since instead of simply pulling data back into RAM, every single application as well as the OS has to go through its full startup routine, which can cause far more CPU activity and hard drive usage.

trpt4him
  • 1,640
3

The questions in particular here requires additional information in this regard, and varily after that a suitable answer can be given. What kind of user are you?

Hibernation is particularly common in laptops and notebooks where the applications are left in the same state as you left them, and the system will come to its original state with everything in the same way.

If you are just a common user who uses the system for internet, games then the web pages and the state of game where you left them will be available to you after a regular boot.

If you are Office employee, and require that you use multiple instances of word or spreadsheet than,hibernate will restore that also.

Moat importantly, in case that you are a computer programmer, than the software which require to to that are large and take quiet some time to load and relocate all the files which you last coded, thus hibernate can also use for that

Thus you can see there are multiple uses

3

The answer is obvious to me.

Shutdown quits and closes everything. Then, after startup, I have nothing open.

A contrario, hibernation and then wake-up give me everything I had on the screen — even unsaved documents.

TheMaskedCucumber
  • 411
  • 4
  • 8
  • 17
3

tl;dr; Shut-off computer without losing another user's work.

I am a huge fan of hiberate and have always set it up on my home desktops. Only recently in the last year have I disabled it after replacing my boot drive with striped SSDs. The choice wasn't due to the fast speed of the SSDs though. I had spent a lot of money on my "new toys" and writing a large memory dump to a SSD on each shutdown isn't good for the life of a SSD. I'd still have hibernate enabled if I could direct it to a secondary non-SSD drive.

On my other computers that don't have SSDs I still use hiberate because they are multi-user and it's nice to be able to shut a computer all the way off without having to worry about losing another users data. A family member may have been researching homework on the web and got side tracked leaving the computer running. I am able to shutdown the computer without losing their work.

2

The fact that your laptop starts under one minute doesn't mean that all laptops on the world start so fast. I have cheap travel-class laptop, used only for internet, and it's very slow. Startup takes a few minutes, shutdown sometimes much over minute. While restoring from hibernate isn't blitz-fast, it's significantly faster than booting, and hibernating is much faster than shutdown.

Standby simply isn't reliable on machines I was using. Leaving notebook standbyed for a half of the day often ended in failed startup and forced reboot, after which I'd had to restore the whole desktop. Not to mention the need to unplug device or the temporary power shortage.

Actually, I know a few people, who thinks that reboot is deprecaded and haven't rebooted for months - using only hibernation. (They are not using Windows, of course;)

2

Another innovative use of the Hibernation feature was its use by Dell MediaDirect 2.0's Express feature for laptops. That was basically a quick boot option that loaded up a custom media player application.

It worked by having a hidden partition with a Windows XP Embeded instalation, including only what is needed to run a media player program, and a custom media player/explorer program. Since the embeded install is basically a stripped down windows, that alone results in faster startup time.

The first time you run it will hibernate once fully loaded, and then reboot back to itself. From then on each boot is simply a restore from that initial hibernation, which resulted in substancially faster boot times. If the software ever had to be updated, or a hardware change invalidated the hibernation file, it would simply delete and recreate it.

(I may have a few details wrong, it has been a while since I last used it, but the above shows the basic concept.)

The basic concept would also apply to non-mobile special purpose windows devices, such as a desktop-based kiosk. If reading the hibernation file from an SSD, combined with a fast start bios, the resulting boot speed might be good enough to allow the kiosk to be off by default, and started by the user on demand.

0

Thought I'd toss one more reason in the pile: having multiple OSes on a machine. If you dual boot between Linux and Windows, for example, you can switch to the other OS and come back without losing any work.

Synthead
  • 251