Hibernation explained. How to delete Hiberfil.sys in Windows 8 or 10.
The Windows computer has the option to hibernate. This is a function where the current state of the running Windows system is saved to disk so that it can be restored back to that current state again more quickly. The purpose of hibernation is to avoid the need to completely reboot the Windows operating system and to reduce power consumption while away from the computer.
The speed with which a Windows operating system can return from hibernation depends on the speed of the hard drive to load the files back into memory (a SSD will be much faster than a traditional hard drive, hence the 2-3 second start times quoted on ultrabooks equipped with solid state drives when resuming from hibernation).
The Windows operating system uses the hiberfil.sys file usually stored in the root folder of the system drive where the Windows operating system resides. Bear in mind that this file is a system protected file and therefore hidden by default. You can use this guide to make it visible: How to show hidden files, folders, drives, and protected system files in Explorer under Windows 8 or 10.
Enabling Hibernation
1. Open an elevated command prompt.
2. Type powercfg -h on, then press Enter.
At this point a hiberfil.sys file is created in the Windows partition's root folder. You can now add 'Hibernate' as an alternative shutdown option in Windows 8, 10 if you wish.
Disabling Hibernation and Deleting Hiberfil.sys
To disable the Hibernation feature in Windows and delete the hiberfil.sys file in the process, do this:
1. Open an elevated command prompt.
2. Type powercfg -h off, then press Enter.
You'll notice hiberfil.sys is gone and the option to Hibernate is no longer present as a Shutdown option.
Controlling the Size of the Hibernation File
The Hibernation file is commonly about 75 percent of the size of the installed RAM memory with Windows 8. The remaining 25 percent is stored in the paging file which helps Windows to load regular system elements faster. The hibernation process has been altered to ensure hiberfil.sys contains the Windows 8 kernel and device drivers which reduces some of the size issues.
Unlike previous versions of Windows where the hibernation file could sometimes reach an ungodly file size, the hibernation file within Windows 8 stays fairly constant. The size of the file relates directly to the installed RAM, therefore a system with 16 GB of installed memory will need 12-16 GB available just for the hibernation file. Not usually a problem with traditional hard drives, but something that can take a chunk out of a 128 GB SSD configuration.
To try to contain the size of the hiberfil.sys file in Windows 8 it is possible to use the command line to manage the file size. Entering the command below in an elevated command prompt will tell Windows to only place 50 percent of what is in the RAM into the hiberfil.sys file:
powercfg.exe /hibernate /size 50
The 50 percent setting is the lowest option available.
In a related article, we also explain the swap file and page file in Windows.
Your mileage may vary. Regardless, even if there was one, it doesn't seem like it would be a major issue...maybe even a good thing if you accidental clicked-on it.
Doing so requires a small 3 line batch file which first re-enables the feature using powercfg.exe, then invokes another system utility command "shutdown /h" to hibernate the machine, which is then followed by another call to powercfg disables it again. Afterwards you can create a shortcut to batch file and put it on your desktop or somewhere convenient to be able to run it whenever you want.
Think of this as "Hibernation-On-Demand" because no hiberfil.sys exists until one is actually needed. Of course you need ensure there's always enough free disk space on drive C: to allow the creation of one when it's needed.
I've used this, in conjunction with the other techniques outlined on this website, to keep hiberfil.sys, as well as the other massive pagefile.sys and swapfile.sys system files off my C: drive/partition.
The documentation for the shutdown command — which still works in Windows 10 — can currently be found at the following location:
https://technet.microsoft.com/en-us/library/Cc732503.aspx
[Note the older Windows XP version of shutdown.exe doesn't have an "/h" option for hibernation. For that version of windows I used a third-party utility of the same name written by Andrej Budja which does support it (as well as another to put the computer to sleep).]
Here are several ways to open an Admin Command Prompt (also known as elevated command prompt): http://www.download3k.com/articles/What-is-an-Elevated-Command-Prompt-Several-ways-to-open-one-in-Windows-8-and-10-00434. The easiest way for me is by pressing Win+X then A. This opens the Power User Menu and then selects Command Prompt (Admin) from it.
I hope that works for you.