Take the 2-minute tour ×

I today discovered that we can set the size of the hiberfil.sys using powercfg -H -size 100% command line tool. Ignoring the hard space you will get, what else will change if we set it to powercfg -H -size 50%? Does it limit max RAM usage to 50%? Will system doesn't hibernate if I we more than 50% of RAM?

share|improve this question
the system will crash with this bucheck (msdn.microsoft.com/en-us/library/ff559341%28v=vs.85%29.aspx) when the used RAM is larger than the hibernation file can store –  magicandre1981 Apr 26 at 14:38

1 Answer 1

up vote 1 down vote accepted

I have found a Microsoft document regarding the hibernation file. What it tells us is that the contents of memory are compressed before being dumped to the hibernation file so most of the time setting a lower percentage size of the hibernation file is beneficial as less disk space is wasted.

The correct syntax for the command appears to be:

PowerCfg.exe /HIBERNATE /SIZE 75

The document also states that if the hibernation file is too small then a "Stop Error" will occur and the codes will suggest how much you need to increase the hibernation file size by.

Doing this will not limit the amount of physical RAM available to your system.

As it is compressed then reducing the size of the file will not be problematic if you only rarely hit 100% of physical memory used and/or your memory is likely to contain data that is reasonably compressible which most of the time it should be.

From that document:

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.

In rare and extreme cases of memory use, including memory validation by a memory performance or test utility, hibernate can fail because the contents of memory cannot be compressed enough to fit within the size of the hibernation file.

I would give it a try at lower numbers but personally I wouldn't go as low as 50%. It might well be fine though and the worst that will happen is that hibernation will fail and you'll have to reboot normally and set the size to be a bit larger.

share|improve this answer
Thanks for answer. I don't know about the official one but both powercfg -H -size 100% and PowerCfg.exe /HIBERNATE /SIZE 75 works properly –  user218521 Apr 26 at 14:58

Your Answer

