By: -

As you are exploring the “C:” drive’s root directory, including the hidden items, you come across a file named pagefile.sys.

You are quite startled to find that the pagefile.sys is huge and almost three times the amount of random-access memory (RAM) that you have currently installed.

What is pagefile sys in Windows 10

If you are concerned that you may run out of storage space for your important business files, and you’d rather delete or reduce the pagefile.sys, then keep reading to find out how to do it.

The Microsoft Windows pagefile.sys has many myths associated with it, so the first step starts with understanding what the file is all about.

So, let’s explore the need for pagefile.sys in Windows 10 and whether you can delete it.

What is pagefile.sys?

Pagefile.sys is a special paging file in Microsoft Windows that stores frames of memory, which usually do not fit into the physical memory.

Advertisement

As the RAM doesn’t have adequate capacity to hold all the essential files, including every running program, or process, the pagefile.sys plays a crucial role as it receives and holds data that are paged-out to it.

Typically, what gets paged-out, are the least-used files.

Windows 10 is configured to automatically manage the paging file by default. The file is located on the hard drive or SSD and is a hidden system file.

So, you won’t be able to see it, unless you change the file viewing settings to show hidden and system files.

The windows system file also acts as a swap file that is designed to improve performance.

And, the file is also featured to store the information about the state of the computer, in cases of a power cut or a crash.

Advertisement

Furthermore, the file contains sensitive information such as user ids, hidden processes, passwords, search activity of browser, download information, and more, which is helpful while solving crimes related to computer.

In conclusion, the file ensures smooth operation of your PC.

Next, let’s get back to the critical question, on whether you can delete the pagefile.sys, as it takes up so much space on your drive?

Can I delete pagefile.sys?

Normally, the PC uses the RAM to store data because it is faster to read it from there, instead of the hard drive.

So, the pagefile.sys comes into the picture when the RAM is full and Windows pages-out data from the RAM to this file.

Furthermore, the file contains essential information about the PC state and the running programs.

Advertisement

In short, though the file is enormous, it is vital to the Windows operation.

The system file is also hidden to protect it from any accidental deletion.

Furthermore, the deletion would imply that Windows would not have any place to put this data when the RAM is full and could lead to the computer crashing.

Hence, it is feasible to not delete pagefile.sys in Windows 10. However, you can transfer the pagefile.sys to an external disk or even set a size limit.

Let’s see how to do this.

1. Moving pagefile.sys to a different drive

Moving pagefile.sys to a different drive

pagefile.sys to an external drive could increase the system speed.

Tip: Remember to format the drive that you wish to use to NTFS ensuring the handling of larger file sizes.

  1. Open Control Panel and Look for Advanced System Settings and select it.
  2. Go to the Advanced tab, and on click Settings within the Performance section.
  3. In the new window that appears, click the ‘Change‘ button under the section named Virtual memory.
  4. You may uncheck the ‘Automatically manage paging file size of each drive‘ option.
  5. And, under “System managed file” select “No paging file“. And, select the external drive that appears under the “C:” drive.
  6. Click the Set button. Click Yes after reading the warning messages, if you choose to proceed.
  7. Restart your PC to apply the changes.

Note: It is pertinent to move the file to a different physical drive to improve performance and not to a different partition on the same hard drive.

After following the described steps, Windows 10 will delete the old pagefile.sys and a new file will be created in the external drive of your choice.

2. Resizing Pagefile.sys

Removing Pagefile.sys

If you have already decided to install more RAM, then this implies that your system could do with a smaller paging file.

  1. Press Ctrl+Alt+Del to access Task Manager, to determine how much virtual memory the system is currently using.
  2. Go to the Performance tab and select Memory.

Note: Keep a note of the memory usage for a couple of days. This will help to work out the virtual memory requirement (on average), leading to fixing the size of pagefile.sys.

  1. Next, Go to Control Panel and navigate to Advanced System Settings. Click on Settings in the Performance section.
  2. In the new window that appears, go to the Advanced tab. And, go to the section named Virtual Memory and click Change.
  3. Next, uncheck the ‘Automatically manage paging file size of each drive in the Virtual Memory window. And, select Custom size option.
  4. You may set the file to around 800MB under the ‘initial size‘.
  5. Click Set to confirm the changes.

The described steps would help to resize the page file.

3. Removing Pagefile.sys

Removing Pagefile.sys

Do you want to clear pagefile.sys in Windows 10? Are you still wondering how to remove the file? Try the following steps:

  1. Go to Control Panel and Select System, to change the paging file settings.
  2. Next, click on About > System info > Advanced System Settings.
  3. Click on Settings under the Advanced tab.
  4. And, click on the Advanced tab and click on Change under the Virtual memory tab.
  5. Uncheck the option “Automatically manage paging file size for all drivers”.
  6. And, select the option “No paging file”.
  7. Click Apply. And, Click Ok.
  8. Restart the PC.

Note: In the case, you wish to reverse your action and have the file back, check the box “Automatically manage paging file size for all drives” and click “Apply” and click “OK”.

4. Deleting Pagefile.sys after every shutdown

Deleting Pagefile.sys after every shutdown

The pagefile.sys has some sensitive information, and you may wish to delete the pagefile.sys after every shutdown.

The process involves overwriting the contents of the pagefile.sys with zeroes and makes the shutdown process slow.

Here’s how you can try the option:

  1. Press Windows Key + R.
  2. Enter regedit and click OK to invoke the Registry Editor.
  3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management in the left side pane.
  4. And, in the right pane, search for ClearPageFileAtShutdown DWORD.
  5. Double-click to open the Properties.

Note: In the case DWORD is not available, in the right pane, right-click the empty space and choose New > DWORD (32-bit) Value.

  1. Enter ClearPageFileAtShutdown (as the name of the new DWORD), and double-click it.
  2. As the Property window appears, set the Value data to 1. Click Ok.
  3. Close the Registry Editor.

In conclusion, if you have heard that disabling the page file would speed up your computer, then you can easily ignore the theory.

You will find that the pagefile.sys is worth having as it enables smooth functioning of the system. However, you can try moving or resizing the file.

And, also note that cleaning the pagefile.sys at system shutdown would increase the performance of the system.


Read Next:


Leave a Reply

Your email address will not be published. Required fields are marked *