What is Virtual Memory or Page File?
According to Microsoft, A paging file is an area on the hard disk that Windows uses as if it were RAM. When there is a shortage of RAM or if Windows finds it better to store it in virtual memory, it is used. It is useful when running an older PC that doesn’t have enough RAM or can use a bit more when required. Since it uses storage, the performance will depend on the storage quality. If you are using an SSD, it will be faster than the HDD. Also, the overall usage of the storage will be more which can further impact the life of the HDD or SSD.
How to reset Virtual Memory or Page File in Windows 11/10
When we reset, it means either Windows clears the file when the system shutdown or when you manually change the size, the System resets it. You can clear or reset the virtual memory or page file using one of these methods. You will need admin permission to execute these.
1] Group Policy Editor
If you are using Windows Professional or Server, you can use the group policy to make the changes.
Open Run prompt using Win + RType gpedit.msc and press the Enter key to launch the Group Policy EditorNavigate to the following folder
Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Option
Find policy: Shutdown: Clear virtual memory pagefileDouble click to open the policy configurationSelect the Enabled radio button and apply the changes
Once done, the virtual memory page file is cleared every time you shut down the Windows PC. The most significant advantage of using this policy is that no one else can access them by connecting the storage to another PC. When in use, Windows protects the page file, but it is not the same case when it is connected to another PC. Read: How to Back up, Move, or Delete PageFile.sys on shutdown
2] Registry Editor
The registry method is for Windows Home users who don’t have access to the group policy. While it is easy to use, it is also risky. Ensure to create a System Restore point which will be handy if you accidentally delete something in the registry resulting in a non-bootable system.
Open Run prompt using Win + RType regedit and press Shift + Enter together.In the Registry Editor, navigate to the following path
Locate DWORD ClearPageFileAtShutdown and double-click to edit itSet the value as 1. It will ensure to clear the page file during the shutdown.
3] Manually Reset Page Size
Every time you change the size of the virtual memory or page file, it will reset and start using it again from the starting.
Open Windows Settings using Win + INavigate to System> AboutUnder Device specification, click on the Advanced System settings linkIt will open the System PropertiesSwitch to the Advanced tab, and then click on the Settings button under the Performance sectionIn the Performance, Options switch to Advanced TabLocate the Virtual memory section and click on the Change buttonCheck the automatic management, and it will enable custom size, the System managed size, and other optionsHere is all you can do nextSet Custom SizeDisable PagingKeep System Manage sizeOnce you change, it will reset the Virtual Memory or Page File
I hope the post was easy to follow, and you were able to reset Virtual Memory or Page File in Windows 11/10.
Is it safe to delete Virtual Memory or Page File?
Yes, you can delete it anytime, but make sure you have disabled the feature first since the file is only removed during the shutdown. You can also delete the file when in safe mode using an administrator account. Read: How to increase Page File size or Virtual Memory
What should I set my paging file size to?
While windows set it to around 10% of the physical memory, it would be best to set it at least two or three times the memory size of RAM. It will ensure to add stability for any heavy lifting for PC.