How to delete or resize pagefile.sys?

4

1

How to delete or resize pagefile.sys in WinXP? Changing properties in "My Computer" doesn't work, changing properties in Administrative Tools > Computer Management doesn't work either.

DSblizzard

Posted 2011-05-01T23:37:35.997

Reputation: 279

4In what way doesn't it work? – Tamara Wijsman – 2011-05-01T23:51:03.040

1I set sizes (original, maximal) of pagefile.sys to, say, 10 MB, then click "Set", then "OK", then reboot. File is 3.5 GB after reboot, did not changed. – DSblizzard – 2011-05-04T03:02:21.760

Answers

2

First, I'd highly recommend you invest in some extra storage space (if that's the concern) rather than do this. If you have a lot of physical RAM, you probably don't need the page file in a practical sense, but it's a safety net that will prevent hard "out of memory" errors, particularly with older programs.

That said, you can use the pagefileconfig.vbs script that's in system32. Example (if you were concerned about the D drive):

PAGEFILECONFIG.vbs /Delete /VO D:

After reboot it should rebuild the page file with the size you've set.

Pastymage

Posted 2011-05-01T23:37:35.997

Reputation: 130

0

Setting the size of the page file to 10 MB is kind of futile. At that point, it's not gaining you anything and the OS probably won't allow it, anyway. In general, in order to function as designed, the page file needs to be at least the full size of your physical RAM. Really, it should be larger than the full size of your RAM or else it's kind of pointless to have it at all.

If indeed you don't need the page file, then the best solution is just to turn it off entirely, not to attempt to set it to e.g. 10 MB.

Disabling the Page File

Before doing this, make sure that it's a smart thing to do for your situation. In particular, make sure you have a lot of RAM before doing this. Once the page file is disabled then programs will fail if they try to allocate more memory than the physical RAM available in your system.

That said, if you do have plenty of RAM, disabling the page file is probably indeed the best option. You should see a performance improvement by disabling the page file. If you have an SSD-based system, not putting a page file on the SSD will also limit wear on the SSD, so it should last longer.

To Delete the Page File

  • Open Computer Properties
  • Go to the Advanced tab
  • Under the 'Performance' heading, click 'Settings'
  • Go to the Advanced tab
  • Under the 'Virtual Memory' heading, click 'Change'
  • Make sure "Automatically manage paging file size for all drives" is not checked
  • Select the drive whose Paging File Size isn't "None"
  • Select the "No Page File" radio button and then click 'Set'
  • Restart the computer.

The page file should now be disabled and pagefile.sys should be gone.

reirab

Posted 2011-05-01T23:37:35.997

Reputation: 1 498

@DavidSchwartz Good point. Better? – reirab – 2017-01-13T19:30:41.213