Hibernate - Change Size of hiberfil.sys File

How to Change the Size of the hiberfil.sys File in Windows

   Information
By default, the size of the hiberfil.sys file is 75% of the total amount of installed RAM (memory) when hibernate is enabled in Vista, Windows 7, and Windows 8.

This tutorial will show you how to change the size of the hiberfil.sys file to what percentage you want it to be.

You must be logged in as an administrator to be able to do the steps in this tutoria.

   Note
You can look at the hidden protected OS C:\hiberfil.sys file to see how large it currently is.

1 GB = 1024 MB or 1,048,576 KB or 10,73,741,824 Bytes

1 MB = 1024 KB

1 KB - 1024 Bytes

CMD-1.jpg

   Warning
While this can be used to reduce the size of the hiberfil.sys file to save HDD space when you have hibernate enabled, I would only recommend to increase the size to be 100% instead of the default 75% to help make sure that everything in memory is saved when you hibernate.





Here's How:

1. Open a elevated command prompt.

2. In the elevated command prompt type the command below with the percentage (50-100%) you want to resize the hiberfil.sys file to be, and press Enter. (see screenshot below)
NOTE: Substitute percentage in the command with 50% to 100%.
powercfg -h -size percentage


For example: If I wanted to resize hiberfil.sys to be 100%, I would type either of the commands below exactly.
powercfg -h -size 100%

OR

powercfg -h -size 100
CMD-2.jpg
3. When finished, close the elevated command prompt.



That's it,
Shawn







 
Last edited:
Dear All,

hibefil.sys is taking 6.36 GB (6,838,988,800 bytes) on my small SSD hard disk drive which is a huge amount of space. I disable hibernation but as i need it so i reactivated it but the size is not decreasing.

I tried to use powercfg hibernate size but no output of it. when i enter the size to 40% so it remain the same above 40% the size increase to 10GB whereas if i give 5% so it remain the same at 6.36 GB.

Can you please Help
 

My Computer

Computer Manufacturer/Model Number
Dell
OS
Windows 7 Ultimate
CPU
D620
Memory
4 GB
Graphics Card(s)
1024 MB
Hard Drives
320 GB
Hello naveeddil, and welcome to Seven Forums. :)

You will only be able to set it as low as 50% instead. However, as 50%, you risk not having everything in memory saved to the hibefil.sys when you hibernate.

If you like, you might also take a look at the tutorial below to see if you may be able to free up some space on the SSD.

:ar: Hard Disk Space - Free Up and Recover - Windows 7 Help Forums
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
I tried to use powercfg hibernate size but no output of it. when i enter the size to 40% so it remain the same above 40% the size increase to 10GB whereas if i give 5% so it remain the same at 6.36 GB.
Check the powerful command "POWERCFG /?".
* POWERCFG command is everything about PC's Power Configurations, included Power Schemes...
POWERCFG /HIBERNATE /ON (or /OFF) to set it on|off. (off, deletes the C:/hiberfil.sys)
POWERCFG /HIBERNATE /SIZE 100 to fetter space size on Disk equal to 100% of physical memory size (RAM).
*There's also a minimum limit, I think at 50%. (size of C:/hiberfil.sys)

Hibernation looks like "eating" a lot of memory, and sometimes makes the system unstable. But, is useful for some of us and saves a lot of energy if wisely set.
I think the Hibernation 'memory' size must be at least 100% to avoid unstable and slow system. (default is 75%)
If don't really need it, close it to free up space on the disk, to give freshness to the memory and faster 'startups'&'shutdowns'.
 
Last edited:

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    W7U x64
    CPU
    AMD A4-6300 APU with Radeon(tm) HD Graphics 3.70 GHz
    Motherboard
    ASRock FM2A78M-DG3+
    Memory
    2x8GB
    Graphics Card(s)
    NVidia GT710 2GB DDR3
    Sound Card
    Tascam US-122L
    Monitor(s) Displays
    3
    Screen Resolution
    1920x1080 + (1280x1024 x2)
    Hard Drives
    HDDs
  • Computer type
    PC/Desktop
Back
Top