Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Even though I only have 4GB of RAM, I have a 12GB pagefile.sys. From what I've read about the topic, this is bigger than the x1.5 rule-of-thumb and it's also taking a huge chunk of space on my hard drive. I tend to run a lot of applications and tabs withing web browsers, so the last time this happened, I closed everything down and restarted my computer. When I ran WinDirStat again later the pagefile was down to 3-4GB. Now my pagefile is up to 12GB again and closing programs/restarting is not working.

My first question is what actions cause pagefile.sys to grow so large in relation to the installed RAM (computer on for long amounts of time, too many programs running, too many browser tabs open)? Second, how can I get my pagefile.sys down to 6-7GB?

I'm running Windows 7 Home Premium SP1 with 4GB of RAM

share|improve this question
2  
Is the current setting to allow Windows to manage the size pagefile or have you configured it to be a specific size. Of course if Windows is creating a 12GB then it should to be that large. –  Ramhound Jan 13 at 16:17
    
Part of the problem is you have so little RAM for the number of programs your using. When Windows runs out of REAL memory it uses swap file and it uses more and more swap file until its needs are met. –  cybernard Jan 14 at 0:34

2 Answers 2

You can force a Virtual Memory file size by:

  1. Left click on 'Start'.
  2. Right click on 'PC'.
  3. Left click on 'Properties'.
  4. Left click on 'Advanced system configuration'.
  5. If needed, left click on 'OK'.
  6. Select 'Advanced options' tab.
  7. Left click on 'Configuration' inside 'Throughput'.
  8. Select 'Advanced options' tab.
  9. Left click on 'Change' inside 'Virtual memory'.
  10. Edit your preferences.
  11. Close all the opened windows by accepting.
share|improve this answer

If you have more than one partition, follow the steps indicated by uprego in his answer but also:

  • set the swap file to another partition (e.g. so no swap file parts on C:, all on D:)
  • reboot
  • do the same again setting the swap file back -reboot

This will recreate the swap file with your initial settings, so you can always force its size down this way (any fragmentation in the file will be removed). But it does not remove the cause of the big file; you will have to figure that out from other clues. As you already suggested, you probably have a lot of programs open at the same time, a lot of browser tabs, or you use memory-hungry applications.

BTW If you just want to remove fragmentation in the swap file use SysInternals' pagedefrag

share|improve this answer
    
pagedefrag doesn't work on 64-bit Windows, which I sadly found out just yesterday. –  Jürgen A. Erhard Dec 16 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.