In this post, we will show you how to increase or reduce the size of the hiberfil.sys file in Windows 11/10 using the powercfg command line. Hiberfil.sys file is a system file that is used by Windows to support Hibernation.
Windows supports hibernation by copying the contents of memory to disk. The system compresses memory contents before preserving them on the disk, which reduces the required disk space to less than the total amount of physical memory on the system.
If you find that the hiber.sys file is becoming too large and occupies disk space, you may want to consider reducing it. In Windows 11/10 now, the size of the hiber.sys file now is 40% of your RAM size by default. You cannot reduce it further. You can either disable Hibernation or change its size between 40% and 100% of your RAM size.
To find out the syntax needed, in an elevated CMD type the following and hit Enter:
powercfg /hibernate /?
Change the size of hiberfil.sys in Windows 11/10
To increase or reduce the size of Hibernate (hiberfil.sys) file in Windows 11/10, follow these steps:
- Open Command Prompt as administrator
- Type the following command-
- powercfg /hibernate /size <percentage>
- Hit Enter.
Let us see the procedure in detail.
From the WinX Menu, open Command Prompt as administrator.
To configure the hibernation file size to 100 percent, use the following command:
powercfg.exe /hibernate /size 100
To configure the hibernation file size to 50 percent, use the following command:
powercfg.exe /hibernate /size 50
In Windows 11/10 now, it is 40% of your RAM. In case you have disabled Hibernation, you will find its size roughly equalling your RAM. In Windows 11/10/8, you will not find the size of Hyberfil.sys running wild when you have Hibernation enabled. In the earlier version of Windows, the hibernation file stored the kernel session, device drivers, and application data. In Windows 11/10/8, the hibernation file stores the kernel session and device drivers only, as a result of which the size remains more or less constant. In Windows 7, your Hiberfil.sys file will be approximately 75% of your RAM.
Windows 11/10 doesn’t allow you to shrink the size of the hiberfil.sys file if the file size is 40% or lesser the size of the installed RAM.
What happens if you reduce the size of hiberfil.sys file indiscriminately?
If the Hibernate file size is too small, Windows may throw a Stop Error.
If Windows fails to hibernate because the hibernation file is too small, a Blue Screen can occur with the following Stop Error code and message:
The parameters provide the following information:
- Parameter 1 is always equal to 0x0000000B.
- Parameter 2 is equal to the size of the hibernation file in bytes.
- Parameter 3 is equal to the number of bytes of data that remain to compress and write to the hibernation file.
- Parameter 4 is unused for this error.
We hope this post helped you.
Read next: How to specify Hiberfile type as full or reduced.