Member, NNT Software Review Panel
Joined: 29 Aug 2005
Location: Little Elm, TX
|Posted: Fri Jul 06, 2012 5:28 pm Post subject: Windows 7 Hibernation - Space Hog
Please forgive me if this topic has already been posted, but I searched and could not find it addressed. Having rersearched and discovered the cause of increased used space on my HDD when nothing had been added, and having fixed that problem; I wrote the following to remind me how I fixed it and thought I would share.
Windows 7 Hibernation - Space Hog
The Windows 7 Hibernation function creates what it most likely the largest file on your PC and most desktop users never choose to use the Hibernation mode. The Hibernation mode is designed to be used on laptops to save battery power. Microsoft created a special hibernation mode for desktops called Hybrid Sleep. On a desktop by default, Hybrid Sleep is set to engage when the system goes into Sleep mode. This means that unless you have already changed this default setting, every time your desktop goes into Sleep mode it also goes into Hybrid Sleep mode.
Hibernation and Hybrid Sleep modes function by copying all open programs, documents, RAM, and other running state files to your hard drive in a file called hiberfil.sys and then turns off major computer components (to save energy). The purpose of Hybrid Sleep is assure recovery from sudden power outage and speed the recovery from sleep. Depending upon what's running and how much RAM you have, this file can get really big. Search for this system file and see how big it is on your system. On my system (with 16 GB of RAM) the hiberfil file was 23.5 GB. With the large capacity HDDs 23.5 GB is not that much; however, for lower capacity HDDs (like the newer SSDs) this hiberfil file can take a large chunk of the HDD. Since saving HDD space is more important to me than saving energy, I removed hiberfil.sys from my system and turned Hibernation (and Hybrid Sleep with it) off. When the Hibernation mode is turned off the hiberfil.sys auto deletes giving that space back to your HDD.
How to Turn the Hibernation Function off in Windows 7:
Click Start button
Type Command Prompt in the Search box and Command Prompt will display above
Right click Command Prompt and select Run as administrator
The command prompt window will open
The default command prompt will differ based upon your set up and may require you the change directory to access the power configuration utility. To change the directory….at the prompt type:
and press the Enter key. This assumes that Windows is installed on the C drive. The prompt will change to:
At the prompt type:
powercfg -h off
and press the Enter key. Note the space between the g and the - and the space between the h and the o. The prompt will return to:
and appear that nothing happened. That means it worked. Close the Command Prompt window and look. No more hiberfil.sys file and no Hibernation option in the Shut Down window. No more space hog.