6

Possible Duplicate:
Can I change the path and directory of the “hiberfil.sys” on Windows 8 due to reduce my C:\ disk usage?

I am running short of disk space on my C:\ drive. I have moved the Windows 8 pagefile.sys, but I cannot move hiberfil.sys.

Is there a way of shrinking hiberfil.sys?

Guy Thomas
  • 3,288
  • 10
  • 35
  • 48
  • Dupe: [Can I change the path and directory of the “hiberfil.sys” on Windows 8 due to reduce my C:\ disk usage?](http://superuser.com/questions/507641/can-i-change-the-path-and-directory-of-the-hiberfil-sys-on-windows-8-due-to-re) - [This Answer](http://superuser.com/a/507662/23133) addresses resizing it. Also see: [How to change location of hibernation file in Windows 7?](http://superuser.com/questions/85369/how-to-change-location-of-hibernation-file-in-windows-7) – Ƭᴇcʜιᴇ007 Nov 21 '12 at 20:57

2 Answers2

7

You can change it. Start Command Prompt as Administrator and run the following command:

powercfg -hibernate -size PercentSize

PercentSize specifies the desired hiberfile size in percentage of the total memory. Its size cannot be smaller than 50.

The size of hiberfil.sys is 6 GB on my system with 8 GB of RAM. This is the default size chosen by Windows, I haven't changed it.

Alexey Ivanov
  • 4,349
  • 4
  • 26
  • 59
  • Does not work for me. powercfg -h or powercfg -hibernate says "incorrect parameters" – Anixx Nov 05 '19 at 16:30
  • @Anixx Run `powercfg /?` to get info for all available commands and `powercfg /hibernate /?` for parameters of _hibernate_ sub-command. Unfortunately, I don't know how I can help you more than that. – Alexey Ivanov Nov 06 '19 at 19:57
1

The hibernation file has always the size of your RAM, because the whole RAM is stored there upon hibernation. The only think you can do is to disable hibernation if you do not use it and the file will be automaticaly deleted.

Igor Kulman
  • 195
  • 1
  • 2
  • 14
  • This was always my understanding, but they let you change it now to a certain percentage. Not sure how that works. Presumably it banks on your machine having less than 100% memory utilization or something. – Mark Allen Nov 21 '12 at 20:13
  • @MarkAllen This used to be the case. Since Windows 7, if I'm not mistaken, you can change the size of `hiberfil.sys`. I think they use regular paging file `pagefile.sys` to store RAM contents above the size of `hiberfil.sys`. Although I haven't tested this theory. – Alexey Ivanov Nov 21 '12 at 20:39