Why isn't hibernation enabled by default?

4

Why isn't hibernation enabled by default? Is there some downside to it?

Also, how reliably does it bring back everything how you left it?

Mick

Posted 2009-11-12T10:39:31.997

Reputation: 1 607

Answers

11

Well, to understand why sleep is preferred instead of hibernation, it's important to know what each of them is (source):

Sleep is commonly known as Standby in Windows system or S3 in ACPI. In Sleep mode, the power supply to non-essential and non-critical component is withheld, and most system operation is shutdown and stopped. All data in physical memory (RAM module) is still kept in internal memory, and whole system is placed in stand-by mode, which can be woke up and used almost immediately. In Sleep mode, the power load reduce considerably, saving a lot of energy. However, the power must not be cut off, and must be continue to supply to the computer. Once out of power, the system will have to start again just like a newly boot computer just started from power off state.

...

Hibernate, or S4 in ACPI, meanwhile will save the data in physical memory to hard disk drive (HDD), and then power off the computer. In Hibernate mode, a file named hiberfil.sys which has the same file size as the amount of system memory will be created on the local disk. When user wants to use the computer again, the computer will boot up and load back the state at the last hibernation. The advantage of Hibernation mode is that no power is wasted for maximum saving of power. In Hibernation dormancy, no electricity is consumed by system. Beside, restore from Hibernate is generally faster than computer reboot, and is totally different from fresh start, as users can return to the exact state of last hibernation with all programs running and documents opened intact, instead of empty desktop. The disadvantage of Hibernate is that after a period of time, there may have fragmentation of file. Users will need to defragment the volume that stores the hibernation file frequently.

Hibernation is slower than sleep because the whole contents of the RAM must be saved on disk when entering this state. Having a 4 GB file on your C: partition is not exactly the best thing, at times. That file must then be loaded back into RAM when exiting hibernation. Sleep is faster, nothing to save, nothing to load (mostly).

Reliability should be no concern for either sleep, or hibernation.

alex

Posted 2009-11-12T10:39:31.997

Reputation: 16 172

Thanks, nice answer - I tried to vote you up - but I don't have enough reps to do it, sorry. – Mick – 2009-11-12T10:57:49.057

1i will do for you Mick . Alex ( that vote from Mick ) ;) – joe – 2009-11-12T11:23:01.503

I read once that Mac OS X continuously writes RAM to the hibernation file. That's a brilliant trick because the result is instant hibernation capability. Resume still takes time, of course. – Torben Gundtofte-Bruun – 2009-11-12T11:47:42.687

@torbengb I doubt Microsoft does it any other way. If you activate hibernation you'll notice the hiberfil.sys file being created. On my machine, with 4 GB or RAM, the file will also be 4 GB. If you try to read anything from it, it will say the file is locked, meaning the OS is continually writing to it. On a Mac it's probably faster because Apple can optimize the whole process, since they also make the hardware. – alex – 2009-11-12T11:51:42.007

I'm pretty sure nothing is being written dynamically to hiberfil.sys, as the competition for disk access would be unnecessary 99.999% of the time. The file exists and is deliberately locked to ensure that it can't be removed, tampered with etc, and that it has pre-reserved the necessary disk space. Filelock != being written to – AdamV – 2009-11-12T14:37:08.137

As to reliability, only danger with pure sleep is that if the power supply is unexpectedly interrupted, you lose everything. Hybrid sleep on Vista and Windows 7 avoids this by writing everything to the disk and keeping it alive in RAM, so if power is lost, you have your session back, if power is not lost you get a much quicker start. Sleep on laptops is normally engineered to revert to hibernate if battery drops too low, but I would not rely on this if your battery is getting old as voltage can drop off really quickly at the end. – AdamV – 2009-11-12T14:40:21.893

Just FYI, it is possible to reduce the size of hiberfil.sys down to 50% of the size of installed RAM. I have no idea how it's possible, but it is. – davr – 2009-11-12T17:31:34.760

1

I think this article might be helpful for you regrding first question ( Why isn’t hibernation enabled by default? )

For enabling and disabling hirbranate here the steps

joe

Posted 2009-11-12T10:39:31.997

Reputation: 11 615

Are you sure that's the right link? It doesn't contain the word hibernate even once :-( – Mick – 2009-11-12T10:52:30.690

sorry its mistake :-( – joe – 2009-11-12T10:53:58.877

0

This is only an anecdote (as the sample size is one - me!) but all the times I've used hibernate it's restored the system perfectly.

I expect that you can find some people who've experienced problems, but I would have expected to read more about them if they were common.

ChrisF

Posted 2009-11-12T10:39:31.997

Reputation: 39 650

Hibernation is rather slow and the system sometimes becomes unresponsive. If you're impatient you might think it's stalled, and you restart. Then, you wonder what happened to your data. I think that's why some people tend to stay away from it. – alex – 2009-11-12T11:03:11.167

0

Hibernation uses disk space (obviously) and doesn't work on some (mostly older) hardware. But when it works, it's solid. You'll know after the first few hibernates whether it works fine on your hardware. There really is no risk to trying it. Many many people use it daily without problems, and only boot all the way down when Windows requires it, or if sloppy apps cause a crash.

ScoBe

Posted 2009-11-12T10:39:31.997

Reputation: 572