If you enable the display of hidden and system files in File Explorer in Windows 10, you will see the hiberfil.sys file at the root of the system drive (on which Windows is installed). The size of this file is usually a few gigabytes. What is this file?
Hiberfil.sys File and Types of Hibernation in Windows 10
Hibernation mode is useful and extremely necessary when working on a personal computer or laptop. The system saves the contents of RAM in the hiberfil.sys file when you send your device to hibernation or to sleep (when hybrid sleep mode enabled).
Consider the main differences between three sleep mode types in Windows 10:
- Sleep mode — the computer goes into a low power state (the monitor, peripherals and hard drive are turned off), but the voltage is not removed from the RAM (the contents of the memory are not cleared);
- Hibernation — used primarily on laptops and tablets. The contents of the memory are stored in the hiberfil.sys file on the hard disk, and the voltage removed from the RAM modules, what saves the battery life of the laptop. When the device is turned on, the data from the hibernation file is loaded back into the memory;
- Hybrid sleep mode — used for the desktop computers. It is a combination of sleep and hibernation mode. When you switch to this mode, the contents of memory are save to hiberfil.sys, but the data in memory is not cleared. Thanks to this, if you turn off the power supply, you will not lose current state of your system.
Those, hibernation, allows the users to quickly load their device and access the saved Windows session. At hibernation, the device loads a little slower than when you exit sleep mode, due to the need to read data from a relatively slow hard drive (compared to RAM). You probably already understood that the size of the hiberfil.sys file should not exceed the amount of RAM installed on the computer.
The main disadvantages of the hibernation mode:
- Use of additional space on the system hard drive (you can not move the file hiberfil.sys to another drive);
- Essential RAM fragmentation when using this mode for a long time instead of turning off/on the computer.
How to Delete Hibernation File Hiberfil.sys in Windows 10?
As you understand, the hibernation mode is almost useless for desktop devices, so you can delete this file to free up some space on the C:\ drive.
The easiest way to disable hibernation in Windows 10 and remove the hiberfil.sys file is to run the Command prompt as administrator and run the command:
powercfg -h off
When you turn off hibernation, the hiberfil.sys file is being automatically deleted. After executing this command, the Hibernate option disappears in the Windows 10 shutdown menu, and the Windows quick boot stops working.
You can also disable hibernation through the registry:
- Start Registry Editor – regedit.exe;
- Go to the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power;
- Find two REG_DWORD parameters: HibernateEnabled and HiberFileSizePercent;
- Change their values to 0.
Can I Move the Hiberfil.sys File to Another Disk?
Unlike the swap file (pagefile.sys), the file hiberfil.sys cannot be moved to another disk (or another partition of the disk), because Windows bootloader always looking for it on a specific path.
How to Reduce the Size of the Hiberfil.sys File?
If you want to use fast startup mode in Windows 10 and don’t want to completely disable hibernation and delete the hibernation file, you can reduce the size of the hiberfil.sys file to save disk space with the command:
Powercfg -h -type reduced
In this mode, only the Windows kernel and system drivers’ data are written to the hibernation file (the size of the hiberfil.sys file in this mode does not exceed 20% of the physical memory of the device). In this case, classical hibernation won’t work, and the file hiberfil.sys will be used for Windows quick boot. To return to normal hibernation mode, run the command:
powercfg /h /type full