101

I would like to know exact instructions for moving the page file from 1 disk location to another disk in Windows 7. I.e. from an SSD to a non-SSD drive.

I've spent about two hours searching - Google, Bing, Blekko - and read many forums. Please don't post philosophical discussions on speed increases or why its a bad idea to disable paging.

I'm looking for a concise answer on how to move the page file.

  • Added tags. I would just clarify for anyone reading this who's confused what JL is talking about that this hasn't been, to my knowledge, called a "swap file" since Win9x - it's "page file" under Windows NT. – Shinrai Jan 25 '11 at 22:27
  • I've modified the question accordingly. – user3463 Jan 25 '11 at 22:58
  • 1
    @Randolph - Aww, foo, I kinda like the older nomeclature. :) – Shinrai Jan 25 '11 at 23:25
  • 1
    possible duplicate of Change the volume the windows page file is on – Mokubai May 8 '12 at 21:24
  • Did you find out how to move the C: page file? Your answers show how to resize, delete, and modify other drive files, but not what you're asking... – TechnicalTophat Jan 19 '17 at 8:30
110

To change page file settings in Windows 7:

In the Start Menu search box, type "Advanced System Settings" and choose the Control Panel applet that should show up, "View advanced system settings"

step1

Under "Advanced" tab, "Performance" section, click "Settings..."

enter image description here

Under "Advanced" tab, "Virtual Memory" section, click "Change..."

enter image description here

These are the actual settings.

enter image description here

Uncheck "Automatically manage paging file size for all drives" and you can change these settings. Highlight the drive you want it on, and select either a fixed size or system managed size, and then click "Set". YOU HAVE TO CLICK THE SET BUTTON. Do the same to remove it from the drive you don't want it on. ("No paging file".)

Click OK, OK, OK, and you should be prompted for a reboot.

  • 7
    Unless things have changed with Vista onwards, I think you still need a small pagefile on C: for BSOD minidumps to be made. – paradroid Jan 26 '11 at 1:49
  • 1
    @Shinrai But the usb flash drives does not exist there . any solution for that ? – Omid Kosari May 7 '13 at 6:22
  • 1
    I changed the location from C: to D: with your instructions. The pagefile on D: was properly created. But I still have the pagefile on C: too. Already rebooted two times. In the virtual memory settings, however, it says "None" for Paging File Size on C:. – Exa Sep 2 '16 at 12:34
  • 1
    @Rahul No idea, sorry – you may have addressed the wrong person here? – slhck Feb 25 '17 at 9:09
  • 2
    @bgmCoder no - that is for the loc of the dump file, but if you don't have a pagefile on your boot partition it won't work without this: In the registry key HKLM\System\CurrentControlSet\Control\CrashControl , created a value called DedicatedDumpFile , type REG_EXPAND_SZ. Set its value to a complete path to a temporary dump file, such as D:\tmp\DumpTemp.sys . Reference: blogs.msdn.microsoft.com/ntdebugging/2010/04/02/… – Jamie Hanrahan May 7 '17 at 22:42
28
  • Control Panel, System
  • Advanced System Settings
  • Advanced Tab
  • Settings button under Performance
  • Advanced Tab
  • Change button under Virtual Memory

enter image description here

  • On your SSD drive, change the option to "No Paging File".
  • Click Set.
  • On your Hard Drive, set the option to either Custom Size or System Managed Size.
  • Click Set.
  • OK and reboot.
  • 1
    Comment by @whizkid: mtone's answer describes it all. When you move the page file, note that you turn off page file on a partition and turn it ON on another. (Hope you do not expect any data residing on it to be moved too, coz thats not going to happen). – Ivo Flipse Jan 26 '11 at 0:14
17

If you want to completely remove the pagefile from your system drive, you will need one extra step to Shinrai and mtone's answers. As a comment by paradroid mentions, Windows requires to have a pagefile present on your system drive in order to write kernel memory dumps in the event of a crash. So even if you set "No pagefile" on your system drive, Windows will end up creating a pagefile anyway, even if it doesn't actually use it for paging. Trying to delete this pagefile will show it to be in use.

In order to work around this, you have to disable kernel memory dumps, which is also done by going through the advanced system settings.

Under the "Advanced" tab, in the "Startup and Recovery" section, click "Settings..."

In the dialogue box that comes up, under the "System failure" section, and the "Write debugging information" subsection, change the drop down menu to "(none)".

After this, you should be able to delete the pagefile.sys from your system drive (although you might need to reboot first).

  • Does this still allow the creation of minidumps from BSOD's? – bgmCoder Apr 26 '17 at 21:28
  • Although Windows will end up creating a pagefile anyway, even if it doesn't actually use it for paging may sound like "windows would prefer using pagefile on another disk, where pagefile is explicitly allowed, and only use pagefile on C in special cases", it is not like that. The pagefile on C would be used just like before. (At least in my case, on Windows7 x64). – i3v May 10 '17 at 16:53
  • @bgmCoder No, BSOD minidumps (i.e.: system failure) is exactly what this option disables. – Camille Jul 31 '17 at 14:15
6

@paranoid you are correct, You need a paging file on the OS partition; the minimum paging file size for the OS partition is 800MB (e.g.: for Win7 Ultimate 64bit). ...This could vary, but Windows will tell you if you set it under the recommended size.

  1. Follow the instructions already posted to set the paging file on the alternate drive.
  2. Then set a small paging file on the OS partition to accomodate the minidumps and BSOD:
    • If you don't set a paging file on the OS partition, every time you boot Windows will create a temp pagefile.sys the same size as your installed physical RAM.
    • So, if you have 16GB of physical RAM, the temp pagefile.sys will be created at 16,308MB (which is a decent chunk out of your System partition).

I recommend researching a bit for anyone who plans on changing paging file settings on a system where lost work could be critical.

2

I noticed that several people may be misinterpreting the Windows recommendation and statements. The fact is, (as someone had said early in the topic), you can improve your systems performance by moving the Page File to a different physical drive.

I have 5 drives in my computer, (2 500GB SSD's and 3 1TB HDD’s), and have moved the Page File from the 500GB SSD O/S Drive, to my most "immediate" HDD media drive. That drive is the one that meant to take 95% of the programs I have installed as well as my Pics and Docs files.

Programs like Adobe Acrobat X, CS 6 Extended, On One Photo Suite 8, etc. are on that Hard Drive. I've recently added another 1 TB HDD and have now moved the Page file to the new 1TB drive thereby making it just that much easier on the entire process.

The point is to keep the Page File partition but move it to a drive that doesn't have to run often. I can’t say how much work the system does when dealing with Page File data, but every little bit helps. Rich

  • 1
    I use Intel Rapid Storage Technology's disk acceleration, utilizing an internal SSD drive - since it only takes half the space on the 119GB SSD, I use the other half for my system's pagefile. – bgmCoder Apr 26 '17 at 21:30
  • I have exactly the same set up as @bgmCoder, except of I have also a smaller pagefile on the system drive, so Windows is able to make kernel dumps. – Dawid Ferenczy Rogožan Sep 6 '17 at 16:50

protected by Community Jul 2 '15 at 22:34

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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