Windows 10 creates a file called hiberfil.sys on your C drive when hibernation is enabled. You can compress the Hibernation file in Windows 10 which allows you to free up valuable storage space.
The hibernation file stores the contents of the RAM when your computer enters hibernation mode. Once it exists hibernation, the system reads the hiberfil.sys file and transfers its content back to memory.
Make no mistake about it, the hibernation file can take up a significant amount of disk space, which is why it’s a good idea to compress the Hibernation file in Windows 10.
How to compress the Hibernation file in Windows 10
Truth be told you can simply disable hibernation and use the sleep mode instead but there are other features that rely on having hibernation enabled, such as Windows 10’s Fast Startup for example. As a result, disabling Hibernation will also disable other useful features, Fast Startup included.
Don’t miss: How to fix the Windows is not genuine problem in Windows 10
A viable solution is to compress the Hibernation file in Windows 10. Â While this is possible starting with Windows 7, it’s not enabled by default. Here’s how you can turn it on.
Right-click on the Start button and select ‘Command Prompt (Admin)’ to open an elevated command prompt.
Type the command below:
powercfg hibernate size NN
where NN is the size you want the hiberfil.sys file to have in percentage of the total memory.
For example, if your PC has 8 GB of RAM and you set the hibernation file to 60% you can write ‘powercfg hibernate size 50’ in the command prompt. This means the hibernation file will only have 4.8 GB of RAM.
This is also useful for systems with less RAM as it lets you free up some space on your C:drive in less than a minute.
If at some point you decide you no longer want the hibernation file to be compressed simply type the following command in an elevated command prompt:
powercfg hibernate size 100
This command will decompress the Hibernation file. Also, you can use these commands in Windows 8 and 8.1.