Limit Size of Hiberfil.sys?


  1. Posts : 57
    Windows 10
       #1

    Limit Size of Hiberfil.sys?


    Every time I try to do research about Hiberfil.sys, all I end up finding is a bunch of tutorials about how to delete it completely. However, in the event that I'm doing something extremely important and my laptop's battery does run out, I'd prefer not to lose everything I've just been working on (even though this most likely won't happen.) However, my OS is running on an SSD and my Hiberfil.sys is taking up 25.7 GB of space. My question is this:

    Is there any way to limit the size of Hiberfil.sys without removing it entirely?

    I don't really understand why it has to take up this much space, but clearly it's a problem on a low-capacity SSD. Once again, I'd like my computer to hibernate if absolutely necessary, but I certainly don't want that to be the case at the expense of this much storage space.

    If not, what do you recommend I do?
      My Computer


  2. Posts : 353
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64
       #2

    You can limit it to 20% or 40% of RAM using the REDUCED or SIZE options, see this tutorial:
    Specify Hiberfile Type as Full or Reduced in Windows 10 - Windows 10 Performance Maintenance Tutorials
      My Computer


  3. Posts : 1,255
    Windows 10 Pro
       #3

    When a computer goes into hibernation it saves the contents of all non free memory (typically that would be most of it) to hiberfil.sys. Recovering from hibernation reverses the process. Memory contents is compressed but there is no way of knowing ahead of time how successful that will be. Some types of data compress very well while others hardly at all. A hiberfil.sys file 40% of RAM size is usually sufficient but there can be unusual situations where it is not. Unfortunately, by the time this is discovered it is too late to back out of the hibernation process and it must fail.

    For fast startup only the system portion of RAM is saved but applications are terminated as in a normal shutdown. This saves quite a bit of time over hibernation and requires a smaller hiberfil.sys.
      My Computer


  4. Posts : 31,651
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #4

    From Windows 7 on...

    Windows reserves disk space for hibernate in the hibernation file, which is named Hiberfil.sys. For Windows 7, the default size of the hibernation file is equal to 75 percent of the total physical memory on the system. For example, on a computer that has 2 GB of RAM, the default hibernation file size is 1.5 GB.
    http://download.microsoft.com/downlo...Footprint.docx


    @JohnTravolski's 25.7GB sounds about right as the default for 32GB RAM.
      My Computers


  5. Posts : 3,257
    Windows 10 Pro
       #5

    While you can reduce the size of the hiberfil.sys, doing so increases the odds that hibernation will fail and you will lose your complete session when your laptop hibernates. If you want to take that chance, then follow DavidE's advice.
      My Computer


  6. Posts : 119
    Windows 10
       #6

    You can go as small as 40% and still have Hibernate available.
    Code:
    powercfg /H /SIZE 40
    I have Windows 10 on a 128GB SSD (Desktop PC) and 32GB RAM. I use powercfg /H REDUCED, which gives me only a 6,854,778,880 byte hiberfil.sys and only allows for Fast Startup and Standby (S3).
      My Computer


  7. Posts : 7,904
    Windows 11 Pro 64 bit
       #7

    I've turned off hibernation on all my PCs since I never use it. This removes hiberfil.sys. I just turn off the the PC or use sleep.
      My Computers


  8. Posts : 201
    Kernel 4.x.x
       #8

    It's a real shame Microsoft hasn't redesigned their implementation of hibernation to be modern and less restrictive.

    Being forced to have hibernate file on the same drive as the kernel executable really sucks. Linux has been well beyond that limitation for over a decade now.

    The best part is, Linux uses it's swapspace as it's hibernate file as well, which would be roughly equivalent to Windows using the same file for hiberfil.sys and pagefile.sys, while being able to locate it anywhere, even over the network .
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:56.
Find Us




Windows 10 Forums