Hiberfil.sys and Pagefile – Is it safe to delete them?

Getting rid of useless data is one of the most effective ways of ensuring that your computer runs smoothly and efficiently, as it clear out the hard drive from unnecessary clutter. Once you start your computer cleaning spree, you may come across two large-sized files in the C drive: hiberfil.sys and pagefile.sys. These will only appear when showing hidden files in Windows folder option, when you use file manage or type C into the address bar in order to display hidden files in a web browser.

While these files tend to be quite big, their size will depend on how much physical memory or RAM your computer has. This is because Windows will set them automatically to suit the amount of RAM available. For those who have a large capacity hard drive for Windows partition, these files will not represent an issue.

However, users that only have an SSD or limited hard drive will be concerned about the amount of space that these files occupy. At first, removing hiberfil.sys and pagefile.sys may seem like the simple solution but it is important to consider how safe this is and how it can be done. Let’s examine the options.

Hiberfil.sys – Hibernation File

Hiberfil.sys is a file created by the system to prompt the computer to enter hibernation mode. Every file in the computer’s memory is copied by Hibernation and written in the hard drive as the hiberfil.sys file. This is why a computer is faster after being restored from hibernation than it would be after a standard boot since the computer only load the hiberful.sys file back into memory. In a computer with 2 GB of memory, hiberfil.sys will be 2 GB as well because this size will make it enough to copy and hold all the files in the memory.

HostGator Web Hosting

Whether you use hibernation or not, hiberfil.sys will still occupy a lot of disk space an it is not possible to move it to a different drive, which is not great when you have SSD or small drive and a huge amount of memory.
Windows enables hibernation by default but if you do not use it at all, you could disable it in order to get back some drive space. This is how you can do it, starting with the method for Windows XP.

How to Disable Hibernation in Windows XP

To switch off Hibernation in Windows XP is easy and all you need to do is to change one option in the Control Panel following the below steps:

1. Go to Control Panel and select Power Options. Alternatively, right click on the Desktop and go to Properties, followed by Screen Saver tab and then Power.

2. Select the Hibernate tab and unmark the “Enable Hibernation” option.

This will automatically delete the hiberfil.sys file once you press OK, ensuring that you recover a large amount of disk space that the file was taking up. You will be able to see exactly how much space you have gained back.

Windows 7, 8 and Vista.

Switching off the hibernate feature in Windows Vista, 7 and 8 can take a while since it is not possible to delete it through the Power options in Control Panel. However, it can be removed and there are two ways to get it done. The first option is to get a Microsoft Fix It tool that is specifically designed for switching hibernation on or off. To remove hiberfil.sys from the C drive, all you need to do is to download and run Microsoft Disable Hibernation Fix It.

The alternative is to use Windows Command Prompt and do the below:

Click on Start and type “cmd” into search to open a Command Prompt with administration privileges, then enter the following:

powercfg -h off

. Hibernate will be disabled immediately and hiberfil.sys will also be deleted. Reversion the process is also quite simple as all you have to do is to type

powercfg -h on

.

Reduce the Size of Hiberfil.sys

A different solution is to change the size of the file, ensuring that it is not automatically set to match the size of the installed memory. You can open a Command Prompt and enter the following: “Powercfg -h – size {percentage number 50 – 100}“. By setting the percentage to 50, you will reduce the size of hiberfil.sys to half of your installed memory.

It is important to keep in mind that this method is not perfect and you may come across some issues when you use it. If you have more memory in use than that allocated to hiberfil.sys, you may experience data loss and system errors since the complete content from RAM may not have been saved.

Pagefile.sys

Now, let’s focus on what you can with Pagefile.sys. Pagefile.sys is a storage file that offers a bigger virtual memory space and that saves temporary data that can be taken in an out of RAM. If the size of the memory installed is 1 GB or less, the size of page file would be around 1.5 times larger. For installed memory of over 1 GB, Pagefile.sys would match that size. Even though page file can take up a large amount of hard drive space, it is important to keep in mind that disabling it may not be the best option.

The reason is that there are many programs that use page file by default and certain tasks such as offloading memory cached have to be in page file. Instead of disabling page file, the solution could be to move it to another drive. While this option does not work for Hibernate as previously mentioned, in the case of Page File is the most suitable fix and it can be done following the below steps.

1. In Windows Vista, 7 and 8, right click on Computer, go to Advanced System Settings, then Performance Settings, followed by Advanced and select Virtual Memory Change. In Advanced, you will be able to see the amount of memory that page file is consuming.

2. For XP, you can follow the same initial sequence but in the Virtual memory window in Vista, 7 and 8 there is an option that says “Automatically manage paging file size for all drives”. You will need to unmark this option to continue.

3. In order to move the page file, you will need to highlight C, choose “No paging file” and then select Set.

4. Select the drive where you want to move pagefile.sys to and click on “System managed size”, then press Set, select OK and reboot. Those who have over 8 GB or memory, will be able to adjust the size by entering the initial size in Megabytes and the maximum size available. By keeping these two values in the same size the performance of Windows may improve to a certain extent.

How to turn off Virtual Memory and Remove Pagefile.sys

While turning off virtual memory to remove pagefile.sys is not advisable, if you are willing to try it you can do it with a few clicks.

In the Virtual Memory window that you find through the first steps in the method to move pagefile.sys to another drive, click on any drive with a paging file set and select “No paging file“, then click the Set button. All drives should have None in the size column and after rebooting, the changes will take effect.

Bear in mind that if your RAM has a low capacity – 1 GB and under – disabling virtual memory off could have devastating consequences on the performance of your computer. The system can slow down and fail to complete multiple tasks at the same time, which is why it is recommendable that you avoid this option.

Loading Facebook Comments ...

Leave a Reply