Windows 7 Hibernation file on an old Netbook

I’ve been trying to squeeze a little more life out of an old netbook with a small SSD. It’s running a fairly minimal Windows 7 install but the C:\ drive (where Windows is installed) keeps filling up. I’ve relocated the virtual memory pagefile.sys file to the more spacious D:\ drive, but wasn’t able to relocate the hibernation file (hiberfil.sys) which stores a copy of the computer’s memory when it goes into hibernation.

There’s a discussion of this on the Microsoft Forums where the outcome is that moving this file isn’t possible. That discussion mentions disabling hibernation (which removes the file altogether) but it’s also possible to limit the size of the file.

Although it is not recommended to reduce the Hibernation file size to below 75% of the size of the installed memory (e.g. 1.5GB for this 2GB system) it is possible to reduce the file size to 50% (e.g. 1GB on this system). If a lot of memory is in use at the point the system hibernates, then it will fail.

To do this find the Command Prompt on your start menu, right click on it and choose “Run as Administrator” from the pop up menu. At the prompt enter the following command to reduce the size of the file to 50%

1Powercfg.exe -h -size 50

Obviously if this was an important system that I needed to hibernate and recover from I would (a) not reduce the file size below the recommended minimum, but also (b) I would not use an old netbook to run it in the first place. Having said that, if it is an issue then Hibernation can be disabled. This command will turn Hibernation off altogether:

1Powercfg.exe -h off