Most of us use the inbuilt hibernation feature to boot into Windows and resume our work quickly. By default, the hibernation feature is turned on in Windows 11/10, but it doesn’t appear in the power menu or power button. You can add the hibernate option in Windows 10 with a few mouse clicks. The hibernate can also be enabled or disabled using a command-line utility.
When you enable hibernate feature on Windows, it creates a new file named hiberfil.sys in the root of your system drive (the drive where Windows is installed) to save the system state. The Hiberfil.sys hidden system file is located in the drive’s root folder where the operating system is installed, and Windows Kernel Power Manager reserves it when you install Windows.
The size of this file is approximately 95% of the random access memory (RAM) is installed on the Windows 7/8 computer. In the recent versions of Windows 11/10, Microsoft has reduced the hiberfil.sys file size to approximately 40% of the RAM installed on the computer. The computer uses the Hiberfil.sys file to store a copy of the system memory on the hard disk when the hybrid sleep setting is turned. If this file is not present, the computer will not hibernate.
For example, my PC is configured with 8 GB of RAM and hiberfil.sys file size is approx 3.16 GB. If you are running out of storage and don’t want to disable hibernate feature completely in Windows 10, you may reduce its size to free up some disk space. The default size of hiberfil.sys varies depending on the amount of RAM (Random Access Memory) installed on your PC.
You can reduce the hiberfil.sys file size by executing a simple command in the elevated Command Prompt. On Windows 7, you can reduce the hibernation file size up to 50% of the RAM; however, Besides on Windows 10, if you try to set the hiberfile.sys file size to 30% or less, Windows 10 will automatically set the RAM size to 40%.
However, on Windows 7, you cannot reduce the hibernation file size to less than 50% of the RAM. Besides, on Windows 11/10, if you try to set the hiberfile.sys file size to 30% or less, Windows 11/10 will automatically set the RAM size to 40%.
How to reduce the Hibernation (hiberfil.sys) file size in Windows 11/10/8/7?
Follow these steps to reduce the Hibernation (hiberfil.sys) file size in Windows 11/10/8/7:-
Step 1. Open an elevated Command Prompt window.
To do so, press the Windows logo + R keys to launch the Run command box. Type cmd in the Run box and then press Ctrl + Shift + Enter keys from the keyboard. Command Prompt with elevated rights opens.
Step 2. If the User Account Control (UAC) window prompts, click the Yes button.
For Windows 11/10/8
Step 3. In the elevated command prompt window, type the following command and hit Enter from the keyboard:-
Powercfg.exe /hibernate /size 50
In the above command, replace 50 with any value between 40 to 100. For instance, if you want to set the hibernation file size to 80% of the original size, use the following command:-
Powercfg.exe /hibernate /size 80
Once you complete the above steps, you can see the new hiberfil.sys in the drive’s root folder where the operating system is installed.
For Windows 7
For a Windows 7 PC, the following command works:-
Powercfg –h –size 50%
In the above command, you can change 50% with your own value. If you want to set the size of hiberfil.sys to 60%, then the command will be Powercfg –h –size 60%.
After completing the above steps, you can view the new hiberfil.sys in the drive’s root folder where you have installed the operating system.
In conclusion, the hibernation feature is a useful function in Windows 11/10/8/7 that allows users to save the system state and quickly resume their work. The hibernation feature is turned on by default, and it creates a hiberfil.sys file in the system drive, which saves a copy of the system memory. The size of the hiberfil.sys file depends on the amount of RAM installed on the computer, and it can be reduced to free up disk space. To reduce the size of the hiberfil.sys file, users can use a simple command in the elevated Command Prompt. By following the steps mentioned above, users can easily reduce the hibernation file size and view the new hiberfil.sys file in the root folder of the system drive. Overall, managing the hibernation feature can help users optimize their disk space and improve the performance of their Windows system.