If you have a large 1TB or 2TB boot drive in your Windows PC, you probably won’t care about this article; a few lost gigabytes means jack to you. If, on the other hand, you’re using a high-speed SSD as a boot drive, every gigabyte counts, and you’ll want to read on.
Most Windows users with SSDs probably have either 64GB or 128GB models (256GB, 512GB, and other large capacity models are still quite pricey). Filling these drives with applications, videos, photos and games is easy, but we expect these things to occupy our precious gigs of space. What we probably don’t expect – and certainly don’t like – is having 10-15GB taken up for no good reason at all. And, for most users, that’s exactly what the HIBERFIL.SYS and PAGEFILE.SYS files do: take up space and offer nothing in return.
What follows is a quick outline of how to get rid of these two files and free up space on your SSD or hard drive.
What are HIBERFIL.SYS and PAGEFILE.SYS?
The HIBERFIL.SYS file is part of Windows’s power system. This file stores what’s in your RAM when your computer hibernates. Hibernation is a power option that saves what’s in active memory to your hard drive or SSD and all power to the system is cut. When powered on again, the previously stored contents of your RAM is replaced, getting you back to the pre-hibernation state. Hibernate has its uses, but with desktops it’s almost always a total waste, and with modern laptops it’s only slightly less worthless.
PAGEFILE.SYS is a file set aside by Windows for use as Virtual Memory, a relic from a time when RAM was expensive, and lots of RAM was very expensive. Virtual Memory, put simply, is a method of using hard drive space as RAM when your actual RAM is full. This doesn’t happen much with modern computers, and some believe that if you have 2GB of RAM or more, it’s useless. I happen to think that 4GB is the amount when Virtual Memory becomes useless, but I have 8GB of DDR3. You probably have 4GB, 6GB or 8GB yourself. If you do, Virtual Memory is nothing more than a waste of SSD storage.
By turning off Hibernate and Virtual Memory on your Windows PC, you can save the space taken up by these two largely fruitless services. Here’s how.
Kill HIBERFIL.SYS: Disable Hibernate
Never use Windows’s hibernate feature? Yeah, you and 98% of the human race. Here’s how to turn it off in Windows Vista and 7:
Save all of your work and close all open applications. Open a Command Prompt with Administrative Privileges (click Start, type CMD in the search field, right-click cmd.exe in the resulting list and select Run as administrator). At the prompt, type the following line:
powercfg -h off
Press Enter. Reboot. That’s it. The HIBERFIL.SYS file will be gone, along with the option to hibernate when you go to power off.
Kill PAGEFILE.SYS: Disable Virtual Memory
Turning off Virtual Memory is a little more time consuming, but is accomplished completely in the Windows GUI – no command prompt required.
Again, save all of your work and close all applications. On your desktop or the Start Menu, right-click Computer and select Properties. From the left side of the resulting window select Advanced System Settings, then the Settings button under the Advanced tab:
Click the next Advanced tab. Then in the Virtual Memory box click the Change button:
In the next Virtual Memory window, uncheck the box at the top of the window labeled Automatically manage paging file size for all drives. Now you can make changes to the system’s settings. Select your boot drive (probably C:) and change the setting from System managed size to No paging file:
Then click Set. You must click Set in order to make the change to the system settings. When prompted, reboot your system.
That’s it. The PAGEFILE.SYS file will be gone upon reboot. If it’s not, use a tool like WinDirStat to locate and delete it. It’ll be the same size as your installed memory, i.e. if you have 8GB of RAM the PAGEFILE.SYS will be 8GB in size.
On my office PC, I saved nearly 16GB by turning off these services, which I never use. 16GB on a 128GB SSD is substantial, and I think Microsoft should do a better job of making these services easy to switch off considering the nature of moderns PCs. Perhaps Windows 8 will offer the option to disable these services when setting up a new computer. I doubt it, though.
As always, proceed with caution. If you hose your system, it’s on you.
Updated June 7, 2012: Changed Title, made minor changes to the article for clarity.