Your computer has two types of memory, RAM (Random access memory) also known as physical memory and Virtual memory, also known as the Pagefile.sys uses part of your hard drive to effectively expand your RAM, allowing you to run more programs than it could otherwise handle. In a nutshell, when physical memory (RAM) is not enough to fit all the running programs, Windows automatically move some load to Virtual memory. Those files are saved on your local hard drive as Pagefile.sys & they are managed by Windows itself.
Pagefile.sys is a file created and used by Windows to manage memory usage. It’s located at C:\pagefile.sys by default, but you won’t see it unless you tell Windows Explorer not to hide protected operating system files.
- Open file explorer using Windows + I keyboard shortcut,
- Click on file then change folder and search options,
- Now, On the View tab, uncheck “Hide protected operating system files (Recommended).”
- Go to local disk C. You should easily see the pagefile.sys.
Advantages of Virtual Memory:
- It allows more applications to be run at the same time.
- It allows larger applications to run in systems that do not have enough physical RAM alone to run them.
- Provides a way to increase memory which is less costly than buying more RAM.
- Provides a way to increase memory in a system that has the maximum amount of RAM that its hardware and operating system can support.
Disadvantages of Virtual Memory:
- It does not offer the same performance as RAM.
- It can negatively affect the overall performance of a system.
- Takes up storage space that could otherwise be used for long-term data storage.
Contents
Can I remove pagefile.sys?
The answer is yes, but you can’t delete this normally by right click and delete. Pagefile.sys is a file created and used by Windows to manage memory usage And needs to perform some special steps if you want to remove it. Here in this post We’ll be discussing two methods to get rid of the paging file in your Windows 10, 8.1 and 7. or you can set it to Windows Pagefile be cleared at every shutdown or reboot.
Note: This could add a significant delay to your shutdown or reboot times as Windows basically rewrites the Pagefile with 0’s to clear it.
Clear Pagefile.sys in Windows 10
- Open Control Panel and search for ‘advanced system settings
- Click Settings within the Performance section, which is on the Advanced tab.
- Now again, choose the Advanced tab in the window that opens and click the ‘Change…’ button under Virtual memory.
- Here uncheck “Automatically manage paging file size for all drivers” and set the option “No paging file.”
- You can also change the size of the file, specifying on your own.
- In the end, click “Apply” and “OK” and restart your PC.
- The pagefile.sys files should disappear from your hard drive.
Clear Pagefile at Shutdown in Windows 10
Also, you can tweak the Windows registry or apply group policy to set Windows clear page file at every shutdown or restart.
Using Windows registry editor
- Search and run regedit from the Start Menu
- Navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ - If you have a REG_DWORD key called ClearPageFileAtShutdown, double-click on it and change the value to 1
If not, right-click and select New > DWORD (32-bit) Value and name it ClearPageFileAtShutdown and set the value to 1 - Restart your computer for the changes to take effect
Note: To revert the changes, edit the same registry key and change the value to 0, then save and reboot.
using group policy editor:
Note: Windows 10 Home basic edition don’t have group policy feature, for this reason, steps below are applicable to Windows 10 pro and enterprise users only.
- Run gpedit.msc (or run Group Policy Editor from your Domain Controller and add or edit a Group Policy)
- Navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options on the left panel
- In the right panel, find and double-click on the Shutdown: Clear virtual memory page file policy
- In the policy settings window, select the Enabled radio option, and then click on the OK button to save the changes
- Restart your computer for the changes to take effect
Note: To revert the changes, edit the same policy above and change the setting to Disabled, then save and reboot.
Also read:
- Fix This App Has Been Blocked For Your Protection in Windows 10
- Windows 10 Stuck Preparing Automatic Repair? Here how to fix
- How to Remove one drive from windows 10 File Explorer
- How to Fix ntoskrnl.exe High Memory Usage In Windows 10
- Solved: Kernel Security Check Failure Windows 10 Blue Screen Error
- 15 Tips to Optimize Windows 10 for better performance