When hibernation is enabled in Windows 10, the operating system creates a file called hiberfil.sys in the root of your C: Drive. This hiberfil.sys stores the contents of memory (RAM) when you hibernate your PC. When you resume from hibernation, Windows reads this file again and transfers its contents back to memory. Because memory capacities on modern PCs are always increasing, the hibernation file takes up considerable disk space. Here is how you can compress the hibernation file and reduce its size in Windows 10.
Although you can disable hibernation and use sleep state or always keep your PC powered, it's not an energy-efficient way for mobile PCs. Also, features like Fast Startup in Windows 10 depend on hibernation being enabled to boot the OS faster. If you disable hibernation, you lose the benefits of fast boot.
To solve the problem of increasing RAM capacities, Microsoft added the ability to compress the hibernation file in Windows 10. This means that the C:\hiberfil.sys file does not take as much disk space as your RAM capacity. It can take significantly less disk space, even 50% of your installed RAM capacity. This is a fantastic improvement Microsoft has made in Windows 7 and later, but it's turned off by default. Let's see how to turn it on.
How to reduce the hibernation file (hiberfil.sys) size in Windows 10
- Open an elevated command prompt.
- Type the following command:
powercfg hibernate size NN
where NN is the desired hiberfil.sys size in percentage of the total memory.
For example, if you have 8 GB of RAM installed and you want to set the hibernation file size to 60% to save disk space. Then simply use this command:powercfg hibernate size 60
This will set the hibernation file to 60% of 8 GB of RAM, meaning only 4.8 GB. It will save you 3.2 GB of disk space.
The size you specify cannot be smaller than 50.
If you have hibernation turned off, the powercfg hibernate size switch will automatically enable hibernation.
You can see the size of the C:\hiberfile.sys file in Explorer in gigabytes (GB) by selecting it or opening its Properties. Normally, this system file is hidden so you may need to turn on the setting to show hidden files as mentioned in step 2 of this article.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
tuned on by default.
http://download.microsoft.com/download/7/e/7/7e7662cf-cbea-470b-a97e-ce7ce0d98dc2/hiberfootprint.docx
https://msdn.microsoft.com/en-us/library/windows/desktop/aa373229%28v=vs.85%29.aspx#filetypes
That’s good to know!
The elevated command prompt is now Windows Power Shell (Admin). This tip then worked for me. Thank you!