How to clean virtual memory (pagefile.sys) every Shutdown [Windows Optimization]

Virtual memory is a file system (pagefile.sys) That WinXP 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 (512MB RAM, pagefile will 768MB to 1GB RAM, pagefile will 1,5GB etc.), but this can be increased or decreased for each user separately, as needed. Since pagefile.sys is an existing file 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 encryptEven if it can reach the pagefile where it can be extracted under certain conditions), or due to congestion data in pagefile.sys, can occur when Windows starts 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 each time Windows Shutdown

1. Using registry Editor

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


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
gpedit-pf enable

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


Note: Enabling automatic cleaning virtual memory every time Windows Shutdown Shutdown's growing by about ~ 30 sec. 7 tested on Windows Ultimate tutorial, compatible with XP or Vista.

How to clean virtual memory (pagefile.sys) every Shutdown [Windows Optimization]

About the author


Passionate about everything that means gadgets and IT, I write with pleasure from 2006 and I like to discover with you new things about computers and operating systems macOS, Linux, Windows, iOS and Android.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment is processed.