You may notice that a file named pagefile.sys takes up a lot of space on your computer’s C drive, and consider deleting it or moving it to other disks for saving space. But are these operations harmful to your system? To answer it, you probably need to ask two more questions at first – What exactly is the pagefile.sys? Can it be deleted or moved to D drive on Windows 10?
Where is Pagefile.sys
Pagefile.sys is usually hidden by default on the root directory of disk (C:).
To view this hidden file, you can open This PC and enter C drive, then switch to View tab and check Hidden items in Show/hide section.
What is Pagefile.sys
Pagefile.sys is the virtual memory pagefile created during installation. The size of this file equals to the minimum value of your virtual memory setting. If the computer is out of memory, it will call virtual memory to execute the program to prevent system memory crash.
It is generally not recommended to delete this paging file if there are no special circumstances, because it is a supplement to physical memory or a temporary dump when the computer is asleep, so it is best to let Windows handle it automatically.
But if you really want to delete pagefile.sys, or move it to other disks, you can actually do that.
How to Delete Pagefile.sys on Windows 10
1. First, you need to get access to Control Panel. Tap the Start button, find the W category and then you can find Control Panel under Windows System menu.
2. Click System among all the options in Control Panel.
3. Click Advanced system settings and hit Settings… button under Advanced tab of the popping out System Properties window.
4. Then, switch to Advanced tab in Performance Options and click Change… in Virtual memory section.
5. Now you are in the Virtual Memory window. The first thing you need to do is unchecking the option of Automatically manage paging file size for all drives. Thus you can do further settings in this page.
6. Choose No paging file and tap Set button to confirm the setting.
7. Hit OK and restart the computer to implement the new changes.
How to Move Pagefile.sys to Other Disks
The steps are all the same till get into Virtual Memory windows, and you need also uncheck Automatically manage paging file size for all drives at first. And then:
1. Choose a different drive, disk (D:), for example.
7. Check System managed size and hit Set button on the right.
Note: you can also custom the Initial size and Maximum size of virtual memory if you know what you are doing, otherwise just let the system take over it.
8. After clicking the OK button, you can allow the computer to restart letting the new changes take effect.
How to Disable Paging Files
If you have a high configuration computer with a relatively large memory, the effect of virtual memory may not be that obvious. You can then consider to disable the pagefile.sys in Registry Editor to improve your computer’s performance.
If your computer doesn’t have enough memory, don’t do this. Otherwise your system is prone to frequent errors until it crashes
1. Press [Windows+R] to evoke the Run window. Enter the command regedit and hit OK or press [Enter] to open the Registry Editor.
2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management and find DisablePagingExecutive on the right.
3. Double click it and change the Value data to 1, then click OK. Now the page file is disabled.
How to Clear Page File at Shutdown
There’s a value named ClearPageFileAtShutdown at the same location. Double click it and change its Value data into 1, then hit OK to confirm it.
The “Clear” here doesn’t mean to completely remove the page file from the hard drive, but to clean up and organize it, thus you computer will make better use of virtual memory next time you turn it on.
But please note, if you enable this feature, it will take longer time when you shutdown the computer or restart it.