Debunking Myths: The Necessity and Risks of Pagefile.sys

Debunking Myths: The Necessity and Risks of Pagefile.sys

Joseph Lv12

Debunking Myths: The Necessity and Risks of Pagefile.sys

When your Windows computer is running out of storage space, you may find yourself looking for ways to free up some of it, even if they’re a bit unconventional. One of these unconventional methods you may come across is deleting the Pagefile.sys file. But before you consider deleting it, you should know what Pagefile.sys is and if you should delete it in the first place.

Here’s what you need to know.

What Is Pagefile.sys?

Pagefile.sys is a system file in Windows set aside for your computer’s Random Access Memory (RAM) , also known as physical memory. When your computer’s RAM begins to run out of memory, it uses the pagefile to offload data it doesn’t need, such as files and apps.

So how does your computer’s RAM decide when to offload data? Let’s use an app as an example of how this works.

Usually, when you minimize an app, Windows will leave it running in the background. However, it will keep its data in the RAM so it can quickly access them when needed.

Then, when you boot up a RAM-intensive app, Windows needs to make room for it within the RAM. As such, Windows will instruct your PC’s RAM to dump the minimized app’s program files into Pagefile.sys, so it can free up memory without losing data.

By default, Windows will store Pagefile.sys in the root folder of your local drive (C:).

When you need to use the minimized app again, Windows will read its data from the Pagefile.sys file. And you’ll be none the wiser that it’s compensating for its physical memory shortcomings with the help of your local drive.

Reading an app’s program files from Pagefile.sys is slower than reading them from RAM. The process is even slower when you’re using a hard disk drive (HDD)instead of a solid-state drive (SDD) . However, It’s faster than closing the app and then relaunching it.

How to Check the Size of Pagefile.sys

To prevent tampering with Pagefile.sys, Windows will hide it by default. If you want to see it, here’s what you should do.

  1. PressWin + E to open File Explorer.
  2. Click onThis PC in the navigation pane on the left and double-click yourlocal drive (C:) on the right to open it.
  3. Now you need to open Folder Options. On Windows 11, click thethree vertical dots in the top menu and selectOptions . On Windows 10, clickView in the top menu and then onOptions .
    selecting options in the top menu of file explorer in windows 11
  4. Select theView tab in Folder Options and uncheckHide protected operating system files (Recommended) .
    The unhide protected os files option in folder options
  5. In the warning that pops up, clickYes .
  6. A bit further up, you seeHidden files and folders . Inside it, check theShow hidden files, folders, and drives radio button.
  7. ClickOK to close Folder Options and apply the changes.
  8. Scroll down in your local drive, and you’ll be able to see Pagefile.sys.
    the pagefile.sys file in the root folder of the local drive

As you can see, the Pagefile.sys file is quite large, which makes many people think deleting it is a good idea when they’re running out of storage space.

Should You Delete Pagefile.sys?

One scenario where it would be reasonable to delete Pagefile.sys to save disk space is if you have a lot of RAM. That way, it can store all the data it needs to keep apps running without needing to offload them. For the average Windows user, the minimum RAM size for this would be 16GB.

If you delete Pagefile.sys and your computer runs out of physical memory, your system will start to become sluggish. If the sluggishness gets too bad, Windows itself might even crash.

Also, you might notice some apps becoming slower or crashing as well. That’s because they have nowhere to put the data they need to operate properly since your computer’s RAM is full and there is no Pagefile.sys to pick up the slack.

So unless your physical memory needs aren’t greater than your installed RAM’s capacity, we recommend leaving Pagefile.sys alone.

How to Delete Pagefile.sys

Since Windows is constantly using Pagefile.sys, it will not allow you to delete it in File Explorer directly. In fact, if you selected the file and hit theDelete key, you will see the following message: “The action can’t be completed because the file is open in another program.”

deleting-pagefile-error

However, there’s another method you can use to delete the file and save some disk space. To do that, follow the steps below.

  1. PressWin + S to open Windows Search.
  2. Typesysdm.cpl in the search box and hit theEnter key to open the System Properties window.
    searching for sysdm.cpl in windows search
  3. Select theAdvanced tab, and in thePerformance section, click theSettings button.
    the system properties dialog box in windows
  4. In the Performance Options window, select theAdvanced tab and clickChange .
    the Perfomance Options window on Windows
  5. In the Virtual Memory window, uncheck theAutomatically manage paging file size for all drives checkbox at the top.
  6. Click on the radio button forNo paging file , and click theSet button on the right.
    the Virtual Memory window on Windows with the No paging radio button ticked PaperScan Professional: PaperScan Scanner Software is a powerful TWAIN & WIA scanning application centered on one idea: making document acquisition an unparalleled easy task for anyone.
  7. You’ll get a warning from Windows. ClickYes to bypass it.
  8. Click onOK to close the Virtual Memory window and apply the changes.
  9. Restart your Windows computer for the changes to take effect.

When Windows boots back up, the OS will have no use for Pagefile.sys, and it will delete it from your local drive. It will also delete the Swapfile.sys along with it. If you don’t know what that file is and its importance, please read our guide on what Swapfile.sys is and if you can delete it .

How to Restore Pagefile.sys

If you deleted Pagefile.sys and discovered that you’re experiencing problems because of it, you can easily restore it. However, if the problems are so severe that Windows is constantly freezing or can’t even boot up properly, you should try entering Safe Mode first. To do that, please check out guides on ways to boot into Safe Mode on Windows 11 and what is Safe Mode on Windows 10 .

Now, to bring back Pagefile.sys, follow the steps below:

  1. PressWin + R to open Windows Run.
  2. In the text box, entersysdm.cpl and then hit theEnter key to launch the System Properties window.
    opening the System Properties window using Windows Run
  3. Select theAdvanced tab, and in thePerformance section, click theSettings button.
  4. In the Performance Options window, select theAdvanced tab and clickChange .
  5. In the Virtual Memory window, make sure theAutomatically manage paging file size for all drives checkbox at the top is checked.
  6. Click onOK to close the Virtual Memory window and apply the changes.
  7. Restart your Windows computer for the changes to take effect.

Once your computer boots up, and you go to the folder where Pagefile.sys is located, you will see that the file has returned, along with Swapfile.sys.

How to Resize Pagefile.sys

If deleting Pagefile.sys isn’t an option for you, consider resizing it instead. Here’s how to do that:

  1. PressWin + E to open File Explorer.
  2. In the Navigation Pane, right-clickThis PC and selectProperties . On Windows 11, you will have to selectShow more options first before you can see theProperties option.
  3. Click on theAdvanced system settings link to open the System Properties window. On Windows 11, you will find the link on the right panel, while, on Windows 10, it will be on the left side menu.
    the About page of the System window in the Settings app on Windows 11
  4. Select theAdvanced tab, and in thePerformance section, click theSettings button.
  5. In the Performance Options window, select theAdvanced tab and clickChange .
  6. In the Virtual Memory window, uncheck theAutomatically manage paging file size for all drives checkbox at the top.
  7. Click on the radio button forCustom size . Immediately, you’ll see that the two text boxes below it (Initial size andMaximum size) are no longer grayed out.
  8. Enter the appropriate page file sizes in megabytes (MB) in both text boxes and then clickSet .
    the virtual memory dialog box on windows with the custom page file size set to 4096
  9. ClickOK to close the Virtual Memory window and apply the changes.
  10. Restart your Windows computer for the changes to take effect.

Pagefile.sys, Demystified

Pagefile.sys is an extremely important file when it comes to keeping your Windows computer running smoothly. It helps give your PC’s RAM more breathing room when physical memory can no longer hold more data. You can delete it, but only do so when you know your computer’s RAM has enough capacity to stand on its own. If not, you’re better off just resizing Pagefile.sys so it doesn’t take up too much space.

If you’re unsure of what to do with Pagefile.sys, just leave it to Windows to handle the file and look for other ways to free up space on your storage drive.

  • Title: Debunking Myths: The Necessity and Risks of Pagefile.sys
  • Author: Joseph
  • Created at : 2024-08-15 16:04:59
  • Updated at : 2024-08-16 16:04:59
  • Link: https://windows11.techidaily.com/debunking-myths-the-necessity-and-risks-of-pagefilesys/
  • License: This work is licensed under CC BY-NC-SA 4.0.