What is Pagefile, and how to adjust itWritten on October 22, 2021 by Chad Warmenhoven
What is Pagefile
When your system runs low on RAM because an application like Firefox is taking too much memory, Windows moves the least used "pages" of memory out to a hidden file named pagefile.sys in the root of one of your drives to free up more RAM for the applications you are actually using. What this actually means to you is that if you've had an application minimized for a while, and you are heavily using other applications, Windows is going to move some of the memory from the minimized application to the pagefile since it's not being accessed recently. This can often cause restoring that application to take a little longer, and your hard drive may grind for a bit.
If you want to take a look at your own pagefile settings, launch sysdm.cpl from the Start menu search or run box (Win+R) and navigate to Advanced –> Settings –> Advanced –> Change.
Linus provides an outstanding explanation of pagefile/virtual memory in the video below:
Look at any tweaking site anywhere, and you'll receive many different opinions on how to deal with the pagefile—some sites will tell you to make it huge, others will tell you to completely disable it. The logic goes something like this: Windows is inefficient at using the pagefile, and if you have plenty of memory you should just disable it since RAM is a lot faster than your hard drive. By disabling it, you are forcing Windows to keep everything in much faster RAM all the time.
The problem with this logic is that it only really affects a single scenario: switching to an open application that you haven't used in a while won't ever grind the hard drive when the pagefile is disabled. It's not going to actually make your PC faster, since Windows will never page the application you are currently working with anyway.
The big problem with disabling your pagefile is that once you've exhausted the available RAM, your apps are going to start crashing, since there's no virtual memory for Windows to allocate—and worst case, your actual system will crash or become very unstable. When that application crashes, it's going down hard—there's no time to save your work or do anything else.
In addition to applications crashing anytime you run up against the memory limit, you'll also come across a lot of applications that simply won't run properly if the pagefile is disabled. For instance, you really won't want to run a virtual machine on a box with no pagefile, and some defrag utilities will also fail. You'll also notice some other strange, indefinable behavior when your pagefile is disabled—in my experience, a lot of things just don't always work right.
If you've got plenty of RAM in your PC, and your workload really isn't that huge, you may never run into application crashing errors with the pagefile disabled, but you're also taking away from memory that Windows could be using for read and write caching for your actual documents and other files. If your drive is spending a lot of time thrashing, you might want to consider increasing the amount of memory Windows uses for the filesystem cache, rather than disabling the pagefile.
Moving to a separate drive for performance improvements and free up space on main drive.
The next piece of bad advice that you'll see or hear from would-be system tweakers is to create a separate partition for your pagefile-which is generally pointless when the partition is on the same hard drive. What you should actually do is move your pagefile to a completely different physical drive to split up the workload.
Occasionally our users will ask about removing the pagefile. Specifically, they are asking about a rather large file on their C drive.
Pagefile.sys is the Windows paging (or swap) file used to manage virtual memory. It’s used when a system is low on physical memory (RAM). Pagefile.sys can be removed, but it’s best to let Windows manage it for you.
When programs on the computer use a lot of RAM — perhaps even trying to use more than the machine actually has — some of its contents are written to the paging file. If the “paged out” memory is needed again, other RAM contents are written to disk — again in the paging file — and the previously-written information is read back in.
It’s where Windows juggles and keeps track of demands for a lot of memory.
Note that pagefile.sys is a “system” file. In order to see the file in Windows File Explorer, the option to “Show hidden files and folders” must be enabled, and “Hide protected operating system files” must be disabled.
As we've seen, the only tangible benefit of disabling the pagefile is that restoring minimized applications you haven't used in a while is going to be faster. This comes at the price of not being able to actually use all your RAM for fear of your applications crashing and burning once you hit the limit, and experiencing a lot of weird system issues in certain applications.
The vast majority of users should never disable the pagefile or mess with the pagefile settings - just let Windows handle the pagefile and use the available RAM for file caching, processes, and Superfetch.
The only REAL reason we see to adjust the pagefile is if you run into trouble. If you're experiencing issues with pagefile/virtual memory(BSOD), your device doesn't have enough memory, or you're trying to improve the system performance, Windows 10 allows you to increase the size of the virtual memory in at least two ways using the Settings app and Command Prompt.
Although anyone can change the paging file size, it's only recommended to use these instructions if you have a valid reason, and you know what you're doing.
1. Open Settings.
2. Click on System.
3. Click on About.
4. Under the Related settings section click Advanced System Settings
5. Click the Advanced tab.
6. Under the Performance section, click the Settings button.
8. Click the Advanced tab.
9. Under the Virtual memory section, click the Change button.
10. Clear the Automatically manage paging files size for all drives option.
11. Select the Custom size option.
12. Specify the initial and maximum size for the paging file in megabytes.
13. Click the Set button.
14. Click the OK button.
15. Click the OK button again.
16. Restart your device.
Once you complete the steps, you should notice an increase in performance when navigating Windows 10 as well as when running multiple apps at the same time.
If you need to revert the changes, you can use the same instructions, but on step No. 10, make sure to check the Automatically manage paging size for all drives option, and restart your device.
Although it's possible to disable virtual memory on Windows 10, even when you have a large amount of system memory, it's not recommended to disable this feature. Usually, if you disable paging file, some applications may stop working, some system features may not work efficiently, and you may end up with some weird behaviors.
Need help with your Puget Systems PC?
If something is wrong with your Puget Systems PC. We are readily accessible, and our support team comes from a wide range of technological backgrounds to better assist you!
Looking for more support guides?
If you are looking for a solution to a problem you are having with your PC, we also have a number of other support guides that may be able to assist you with other issues.