How to Resize the Hibernation File With powercfg /h size on Windows 11
🔍 WiseChecker

How to Resize the Hibernation File With powercfg /h size on Windows 11

Windows 11 reserves a portion of your system drive for the hibernation file, which stores the current system state when you put your PC to sleep. By default, this file is set to about 40 percent of your installed RAM, which can consume tens of gigabytes on systems with 16 GB or more memory. If you use Hibernate regularly but want to reclaim disk space, you can shrink the file without disabling Hibernate entirely. This article explains how to resize the hibernation file using the powercfg /h size command on Windows 11.

Key Takeaways: Resizing the Hibernation File on Windows 11

  • powercfg /h /size [percent]: Sets the hibernation file to a custom percentage of your total RAM, reducing disk space usage.
  • powercfg /h /type reduced: Switches to a smaller hibernation file that only supports Fast Startup, not Hibernate.
  • powercfg /h /type full: Restores the default full-size hibernation file that supports both Hibernate and Fast Startup.

ADVERTISEMENT

What the Hibernation File Does and Why Its Size Matters

The hibernation file, named hiberfil.sys, is a hidden system file located at the root of your system drive, typically C:\hiberfil.sys. When you select Hibernate from the Power menu, Windows writes the entire contents of your RAM to this file. When you turn the PC back on, it reads the file back into memory, restoring all open programs and documents exactly as you left them. This behavior requires the file to be large enough to hold a complete snapshot of your RAM.

By default, Windows 11 allocates about 40 percent of your total physical RAM to the hibernation file. On a system with 32 GB of RAM, that means a file of roughly 12.8 GB. This default size is a compromise between full Hibernate support and disk space efficiency. However, the actual space needed for a successful hibernation depends on how much memory your running applications are using at the time of hibernation, not the total RAM installed. Many users can safely reduce the file to 30 percent or even 25 percent without experiencing Hibernate failures.

The powercfg command offers two ways to control the file size. The /h /size parameter lets you specify a precise percentage from 1 to 100. The /h /type parameter switches between a full file that supports both Hibernate and Fast Startup, and a reduced file that supports Fast Startup only. Fast Startup is a hybrid shutdown that uses a smaller hibernation file to speed up cold boots, but it does not save your open programs.

Steps to Resize the Hibernation File Using powercfg /h size

  1. Open Command Prompt as Administrator
    Press the Windows key, type cmd, right-click Command Prompt in the search results, and select Run as administrator. Click Yes on the User Account Control prompt.
  2. Check the current hibernation file size
    Type powercfg /h /size /? and press Enter. This shows the current file size as a percentage of RAM. Alternatively, open File Explorer, navigate to C:\, and enable hidden items to see hiberfil.sys. Right-click the file, select Properties, and note the size on disk.
  3. Set the hibernation file to a custom percentage
    Type powercfg /h /size 30 and press Enter. Replace 30 with your desired percentage. The value must be an integer between 1 and 100. A setting of 30 percent works well for most systems with 16 GB or more RAM. The command completes immediately with no confirmation message.
  4. Verify the new file size
    Type powercfg /h /size /? again or check hiberfil.sys in File Explorer. The file should now reflect the new percentage. If you set it to 30 percent on a 16 GB system, the file should be about 4.8 GB.
  5. Switch to a reduced hibernation file for Fast Startup only
    If you do not use Hibernate but want to keep Fast Startup enabled, type powercfg /h /type reduced and press Enter. This creates a smaller file, typically around 20 percent of RAM. To revert to full support, type powercfg /h /type full.

ADVERTISEMENT

Common Mistakes and Limitations When Resizing the Hibernation File

Setting the size too low causes Hibernate to fail

If you set the hibernation file to a percentage lower than the amount of RAM your running applications require, Windows may fail to hibernate. The system will either ignore the Hibernate command or display an error. To fix this, increase the percentage using the same powercfg command. A safe starting point is 30 percent. If you encounter Hibernate failures, increase in increments of 5 percent until the command works.

Changes do not take effect immediately after a system restore

If you restore your system from a backup or reset Windows, the hibernation file resets to the default size. You must run the powercfg command again after the restore. The same applies after a major Windows update that resets power settings. To avoid surprises, check the file size after every feature update.

Reduced type disables the Hibernate option

Using powercfg /h /type reduced removes the Hibernate option from the Power menu. If you later want to use Hibernate again, you must switch back to full type with powercfg /h /type full. The reduced type is intended only for Fast Startup, which speeds up cold boot times without saving your open session.

Disk Cleanup may report a larger hibernation file than actual

The Disk Cleanup tool sometimes shows the hibernation file size incorrectly after resizing. This is a display bug and does not affect functionality. To confirm the real size, use dir C:\hiberfil.sys /ah in Command Prompt or check the file properties in File Explorer.

Hibernation File Sizes: Default vs Reduced vs Custom

Item Default (Full) Reduced (Fast Startup Only) Custom (User Set)
Description Supports Hibernate and Fast Startup Supports Fast Startup only Supports Hibernate and Fast Startup
File size (% of RAM) 40% ~20% User-defined (1-100%)
Hibernate menu option Available Not available Available
Fast Startup behavior Enabled Enabled Enabled
Command to set powercfg /h /type full powercfg /h /type reduced powercfg /h /size [percent]

You can now control exactly how much disk space the hibernation file uses on your Windows 11 system. Start with a 30 percent value and test Hibernate functionality. If you only need Fast Startup, use the reduced type to save even more space. To monitor disk usage after resizing, open File Explorer and check the size of hiberfil.sys. A practical next step is to run Disk Cleanup to remove other unnecessary system files after freeing up space.

ADVERTISEMENT