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

  • 5
    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, 2014 at 16:17
  • 3
    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, 2014 at 0:34
  • Does this answer your question? How do I decrease the size of the page file?
    – Montag
    Jun 9, 2020 at 19:33

3 Answers 3


You can manually limit the pagefile size by performing the following steps:

  1. Click on the Start button.
  2. Right click on Computer.
  3. Select Properties
  4. Click on Advanced system settings on the left.
  5. Click on the Settings button under the Performance group.
  6. Select the Advanced tab of the Performance Options window.
  7. Click on the Change button.
  8. Uncheck Automatically manage paging file size for all drives.
  9. Select the C: drive in the list.
  10. Check the Custom size radio button.
  11. Enter the Initial and Maximum sizes you want to use. I would recommend 4096 MB for the Initial and 6144 MB for the Maximum.
  12. Click OK on the Virtual Memory dialog.
  13. Click OK on the Performance Options dialog.
  14. Click OK on the System Properties dialog.
  • 2
    So, multiply your GB of RAM by 1024 for the Initial and multiply that result by 1.5 for the Maximum? Jun 1, 2019 at 14:46
  • For anybody trying to do this with Windows 11. You can go to Settings, then System, then About, and then "Advanced system settings" is there as part of the "Device specifications" stuff. Apr 7 at 21:46

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.
  • This sounds like very specific instructions for some OS version other than Windows 7. Are you sure this isn't for Vista, or Windows 8?
    – jpaugh
    Jun 17, 2015 at 15:54
  • No, not at all.
    – 174140
    Jun 17, 2015 at 19:20
  • There is no 'Configuration' button or 'Throughput' group on the 'Advanced' tab. Jan 20, 2016 at 19:42
  • I might have been guessing from five to nine. Upvoters please upvote more exact answer too.
    – 174140
    Jan 21, 2016 at 9:33

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

  • 1
    pagedefrag doesn't work on 64-bit Windows, which I sadly found out just yesterday. Dec 16, 2014 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .