Friday, August 18, 2006

Windows and Hibernation

First of all what is it?
When Windows entrees in hibernation mode, it saves all its memory content in a file on the hard drive (hiberfil.sys) then powers the entire system off. Yes, it really does that, it is not a stand-by mode of some sort, it is fully powered off (however, modern computers still keep a small amount of power going on even in off mode, but that is by design). In this state you can unplug the computer from the main power supply and, if it is a laptop, you can also remove the battery with no danger in losing the data.
Data loss
There is no danger in losing any data since the memory is safely saved on the hard drive. However if something fails with the "wake up" from hibernation, Windows may delete the hibernation file and start all over.
Powering up
When the computer is powered on again, Windows reads the memory content back from the hard drive and resumes from the point it was before hibernation. This means that all open programs are still open, open documents are still open, network connections are resumed and so on.
What to do before hibernating your computer
First of all save all your open documents. It is not necessary to close them, but saving them ensures that if there is a problem with waking up from hibernation the documents are intact. However if you keep them unsaved, when you resume you can still save them safely in most of the cases. Second, ensure that you don't have downloads or file transfers in progress because all network connections are reset before hibernation and all transfers will fail on wake up.
Enabling hibernation
To enable or disable hibernation open Control Panel (Start > Settings > Control Panel) then go to Power Options. There open the "Hibernation" tab. If this tab is not visible then your computer does not support hibernation. In that tab make sure that the checkbox is checked to enable the hibernation or unchecked to disable it.
Hibernating the computer
Use the normal Start > Shut down... procedure and choose Hibernate from the list. If you are under XP and you have a shut down box with three buttons on it (Stand by, Turn off and Restart) press the Shift key and the Stand by button transforms into Hibernate and you can click it. You can also use the Power Options applet from Control Panel where in the Advanced tab you can choose what the computer should do when you press certain buttons or switches like "Power", "Sleep" or when you close the LID on your laptop.
Advantages
The main advantage is that all your programs and documents stay open so you can continue your work later. Another advantage is that usually it takes less to wake up from hibernation than powering up from zero, especially if the computer is slow or you have many programs in the start up list.
Disadvantages
The only disadvantage is that this way you don't shut down the computer for days, weeks or even months, so sometimes the system gets chocked and chocked and goes slower with no apparent reason. Some reboots now and then or normal shut downs are recommended. Also, a big file (hiberfil.sys) will be created on hard drive with the size equal to the ammount of memory you have (1 GB memory >> 1 GB file size).
Conclusion
If you want to use hibernation is up to you. I use it daily both on my laptop and on my desktop. For me is so simple to press the power switch (and close the LID on the laptop) then leave with my work "frozen in time"...

3 comments:

Anonymous said...

Thanks a lot!! ur info was really useful!

Anonymous said...

Thank you, maybe windows 7 will be better at managing system memory when using the hibernating feature.

Lusu said...

Actually Windows 7 hibernates faster than previous versions. There are real and visible improvements. So far I use Windows 7 on 2 computers and I never saw a system crash. True that some apps still crash or hang, but that's not Windows fault...