Monday, May 23, 2016

Disable Hibernate in Windows

Hibernate is a neat feature that is especially useful on laptops. Hibernate is different than sleep/standby in that with sleep/standby, the system shuts down most of the hardware, including the hard drive, but keeps the RAM powered to save the current state. This will (very) slowly drain the battery, but is extremely fast to resume. Hibernate saves the RAM state to hard disk and powers everything off. This is slower to resume than sleep/standby, but won't drain the battery and is still faster to resume than a full shutdown.

By default on Windows systems, hibernate is enabled. This includes servers, which should probably never enter hibernate state. The problem with hibernate, especially on older servers, is that the system reserves hard disk space large enough to store the contents of the RAM in the C:\hiberfil.sys file, which is a protected system file. If you have a small hard drive and a bunch of RAM, this can very quickly eat up a lot of valuable disk space. The only way to get this space back is to disable hibernate, which in most cases for servers, is a best practice anyway.

The easiest way to disable hibernate is to open a command prompt (cmd.exe) as administrator and run this command:
powercfg.exe -H off

No comments:

Post a Comment