sententia
Home    Blog

Free up disk space remove hiberfil.sys

My desktop pc has a 100 gb SSD and I was down to 7 GB which was causing problems with performance.   I removed as many apps as possible and still not much margin.
Found a big 12 gb file called hiberfil.sys  which is use for storing data to recover from hibernation.   This is a desktop pc and I don't hibernate it.
 
I found this info on how to eliminate that file and gained 12 gb back (which was size to 40% of my memory of 32 gb)
 
 
 

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:

Ezoic

 

powercfg /hibernate /?

change the size of hiberfil.sys

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:

  1. Open Command Prompt as administrator
  2. Type the following command-
  3. powercfg /hibernate /size <percentage>
  4. Hit Enter.

Let us see the procedure in detail.

From the WinX Menu, open Command Prompt as administrator.

Ezoic

 

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.

ReadCan I move Hibernation file to another drive?

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.

Ezoic

 

Different Hibernation file types

Hibernation files are used for hybrid sleep, fast startup, and standard hibernation. There are two types, differentiated by size, a full and reduced-size hibernation file.

Hibernation file type Default size Supports…
Full 40% of physical memory hibernate, hybrid sleep, fast startup
Reduced 20% of physical memory fast startup

To verify or change the type of hibernation file used, run the powercfg.exe utility. The following examples demonstrate how. For more information, run powercfg /? hibernate.

Example Description
powercfg /a Verify the hibernation file type. When a full hibernation file is used, the results state that hibernation is an available option. When a reduced hibernation file is used, the results say hibernation is not supported. If the system has no hibernation file at all, the results say hibernation hasn’t been enabled.
powercfg /h /type full Change the hibernation file type to full. This isn’t recommended on systems with less than 32GB of storage.
powercfg /h /type reduced Change the hibernation file type to reduced. If the command returns "the parameter is incorrect,” see the following example.
powercfg /h /size 0
powercfg /h /type reduced
Retry changing the hibernation file type to reduced. If the hibernation file is set to a custom size greater than 40%, you must first set the size of the file to zero. Then retry the reduced configuration.

Only fast startup can use a reduced hibernation file, says Microsoft.

 

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:

STOP 0x000000A0 INTERNAL_POWER_ERROR

Parameter 1
Parameter 2
Parameter 3
Parameter 4

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.