Have you ever noticed that there is a file named pagefile.sys? It is located in the C:\ drive. And do you know what pagefile.sys is used for in Windows? If you don’t know, then this post offered by MiniTool Software is what you need.
You may notice that there are a lot of files that ended with .sys, such as Hiberfil.sys. So if you want to get some information about other files ended with .sys or .exe, then you can visit the MiniTool website. And this post focuses on pagefile.sys.
Introduction to Pagefile.sys
To begin with, what is pagefile.sys? It is a file created and used by Windows to manage memory usage and it is located in the C:\ drive by default. You can only see the file unless you set show hidden items in Windows Explorer.
The pagefile.sys file is a Windows page file, and it is also famous as the virtual memory or swap file. Normally, Windows stores files, programs, and other data in your RAM because it is quicker to read from RAM than it is to read from a hard drive.
More specifically, when you open Google Chrome, Google Chrome’s program files are read from your hard drive and placed into your RAM. Then your computer uses the copies in RAM instead of repeatedly reading the same files from your hard drive.
However, when your system runs out of physical memory or random access memory, then Windows moves some data from the RAM back to the hard drive and places it in a page file. This file is a form of virtual memory.
Although writing this data to the hard disk and reading it back later is much slower than using RAM, it is backup memory – the data is not stored on your hard disk so that your important data won’t lose and your programs won’t crash.
So what is pagefile.sys used for in Windows? It is the file where Windows keeps track of how your computer juggles a lot of demands for memory. If there are some data that you are not using, then Windows will try to move them to the page file.
Can You Delete Pagefile.sys?
You may ask yourself: “can I delete pagefile.sys?” The answer is yes, but it is better to have a page file than have no one. And you should know that deleting the page file may result in some bad things.
If programs start running out of all available memory, they will begin to crash instead of being swapped out of the RAM into the paging file. This can also trigger issues when running a program that needs a lot of memory, such as virtual machines. Some programs may even refuse to run.
What’s more, you can’t just delete the pagefile.sys file because it is being used by Windows. When you try to right-click the pagefile.sys file to choose Delete, then you will get a message saying that “permission denied”, “file in use” or something similar. So how to delete the pagefile.sys file? The answer is to set your Virtual memory to zero.
Follow the instructions below to do that, and you need to run Windows File Explorer as an administrator at first.
Step 1: Open Windows File Explorer and then right-click This PC to choose Properties.
Step 2: Click Advanced system settings and then go to the Advanced tab.
Step 3: Click Settings… under the Performance section and then go to the Advanced tab.
Step 4: Click Change… under the Virtual memory section. Then uncheck the box next to Automatically manage paging file size for all drives. Select Custom size: and then input 0 both into the box next to Initial size (MB) and Maximum size (MB).
Step 5: Click Set and OK to save changes, then reboot your computer to take effect.
After you set your Virtual memory to zero, Windows will not use the pagefile.sys file anymore, and then you can delete the file.
Bottom Line
All in all, this post gives you a brief introduction to the pagefile.sys file. So after reading this post, you should know that windows will use the file when your RAM is run out. In addition, it is not recommended to delete the file. And you should leave the Virtual memory settings, and pagefile.sys the way they are.