Virtual Memory or Page File is a type of memory that allows Windows to use part of the storage space a RAM, to improve the overall performance or when there is a need for extra memory. While Windows configures it automatically, you can always reset it. This post will guide you on what this memory is and how to reset Virtual Memory or Page File in Windows 11/10.
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.
- Group Policy
- Registry Editor
- Manually Reset Page Size
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 + R
- Type gpedit.msc and press the Enter key to launch the Group Policy Editor
- Navigate to the following folder
Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Option
- Find policy: Shutdown: Clear virtual memory pagefile
- Double click to open the policy configuration
- Select 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 + R
- Type regedit and press Shift + Enter together.
- In the Registry Editor, navigate to the following path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
- Locate DWORD ClearPageFileAtShutdown and double-click to edit it
- Set 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 + I
- Navigate to System> About
- Under Device specification, click on the Advanced System settings link
- It will open the System Properties
- Switch to the Advanced tab, and then click on the Settings button under the Performance section
- In the Performance, Options switch to Advanced Tab
- Locate the Virtual memory section and click on the Change button
- Check the automatic management, and it will enable custom size, the System managed size, and other options
- Here is all you can do next
- Set Custom Size
- Disable Paging
- Keep System Manage size
- Once 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.