If you have a small Windows installation drive, like a 60GB SSD, using the Hibernate feature can be quite costly. Mainly due to the hiberfil.sys file using several GBs worth of space. To reclaim space, you can disable hibernation, reduce hiberfil.sys file size, or try to move hiberfil.sys to another drive.
Move hiberfil.sys File to Another Drive
Now, I know I titled the article as “How to Move” but the reality is that you cannot simply move the hiberfil.sys file from the boot partition to any other drive. It’s simple as that.
Sure, I’ve seen some methods that use junctions or registry edits to forcefully change the file path to move the file. But, they just don’t work. At least, not reliably. In fact, I tried a few of those methods with no success. At best, the hibernation did not work and at worst, the system just crashed.
So, what I’m trying to say is that even if you found some magical way to change the hibernate file location, I won’t recommend it. It’s not worth the hassle and uncertainty.
Why Can’t You Move the hiberfil.sys File?
Without going overly technical, this is the reason.
When you hibernate Windows, the system state is stored in the hiberfil.sys file. This allows it to resume the system where you left off. As such, the hiberfil.sys file is needed early in the boot process.
The thing is, the boot process is a miniature file system and has no idea on the mount points of different drives. When you change the location of the hiberfil.sys file, it needs to know the location and mount drive. To do that, it needs access to the Windows Disk Management service that won’t be available until you boot up Windows.
Considering how complex the hard drive configuration can get, Windows just decided not to support hiberfil.sys placed in any other drive other than the boot drive.
If you want to learn more, read this TechNet article by one of the Microsoft engineer’s.
Reduce hiberfil.sys File Size
Even though you can’t move the file, you can reduce the hiberfil.sys file size by up to 60%. For example, if your hiberfil.sys file is around 10GB, you can reduce it around 4GB to 5GB without any performance penalty. As you can guess, this simple trick will let you reclaim some lost space.
1. First, search for “Command Prompt” in the start menu and select the “Run as Administrator” option. You can also right-click on the Command Prompt result and select the option too.
2. In the Command Prompt window, execute the below command. By default, the command will reduce the file size by 70 percent of the original size. If you want to, you can increase or decrease the percentage as needed.
Important: Don’t go any lower than 50%.
Powercfg –h –size %70
As soon as you execute the command, the window will show the new file size of the hiberfil.sys file.
That is all. If you are stuck or need some help. Comment below and I will try to help as much as possible.
If you like this article, check out how to add the missing Hibernate option in the start menu and other places.