How to clean the Virtual Memory (pagefile.sys) at every Shutdown [Windows Optimization]

Virtual memory is a file system (pagefile.sys) That Windowsul uses to store data or files that are used by the user at a time. Usually the size pagefile.sys is determined by how RAM is installed in the computer (at 512MB RAM, the pagefile will have 768MB, at 1GB RAM, the pagefile will have 1,5GB, etc.), but this can be increased or decreased by each individual user, as needed. Considering that pagefile.sys is an existing file on hddAnd the HDD is a magnetic storage device - Unlike RAM, which is dynamic - Data stored in virtual memory remain there until they are deleted or to rewrite the above them, and these data may contain information sesibile for users, such as various passwords (Many applications have habit send information to memory without setting the encrypt, even if it can end up in the pagefile where it can be extracted under certain conditions), or, due to the agglomeration of data in pagefile.sys, at startup Windowscan occur various errors si system performance is affected. To avoid these problems, it is recommended virtual memory cleaning periodically, as often as possible.

How can we clean pagefile.sys automatically, every time Windows Shutdown

1. Using registry Editor

  • open regedit (Start-> Search-> regedit or Start-> Run-> regedit) And navigate to the path HKEY_LOCAL_MAChinSYSTEMCurrentControlSetControlSession ManagerMemory Management
  • entry in the right pane look ClearPageFileAtShutdown and modify the value of 0 in 1 (Right-click> Modify)
regedit-pf

2. Using Group Policy Editor (The method is not valid for editions Windows Starter or Windows Home)

  • open Group Policy Editor (type: gpedit.msc in Run or Searchacquis in Start Menu)
  • in the left pane click on Computer Configuration->Windows Settings-> Security Settings-> Local Policies-> Security Options
  • then in the right pane, double-click on Shutdown: Clear virtual memory pagefile, select Enabled and click on OK

3. Using Microsoft Fixit (Download and run the executable)

Fixit-pf

Note: Enable the automatic cleaning of the virtual memory on each one Windows Shutdown increases Shutdown duration by about ~ 30 sec. tutorial tested on Windows 7 Ultimate, also compatible with XP or Vista.

Passionate about technology, I enjoy writing on StealthSettings.com since 2006. I have a rich experience in operating systems: macOS, Windows, and Linux, as well as in programming languages and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, PrestaShop).

How to » Microsoft » How to clean the Virtual Memory (pagefile.sys) at every Shutdown [Windows Optimization]
Leave a Comment