Moving Virtual Memory to Different Drive in Windows 11

Published by Nyau Wai Hoe - Updated on

Virtual memory lets the system use hard drive space as an extension of RAM, which helps maintain the operation even when the RAM is all used up. It also prevents your PC from crashing when memory is running out. Sometimes, for better speed or just to manage space better, you might want to move your virtual memory, or pagefile, to another drive (like to an SSD because it’s faster). This guide will show you how to do that in Windows 11.

Also see: How to Delete Pagefile.sys in Windows 11

Moving Virtual Memory to Different Drive in Windows 11

What is virtual memory or pagefile?

Virtual memory, also called a pagefile, is basically just a part of the hard drive that the system will use like RAM. When your computer’s actual RAM is full, Windows starts using the virtual memory. It’s slower than RAM but it’s needed as a backup to prevent “out of memory” or similar problems.

Choose the right drive for virtual memory

The best place for virtual memory is on the fastest drive you have. People often use the system drive (usually C:), but if you have a faster SSD that isn’t the system drive, it’s better to use that.


If you have a small SSD, the pagefile can take up a lot of space. This is important if your SSD is almost full because a big pagefile (sometimes several gigabytes) can use up a lot of your available space.

Running out of storage space on system SSD drive

Some think moving the pagefile from an SSD to an HDD can make the SSD last longer. But with modern SSDs, this isn’t really a problem. Virtual memory doesn’t really wear out an SSD much, and most people will replace their SSD for other reasons before it wears out.

Pro tip: How to Allocate More RAM to a Game in Windows 11 or 10

Should you move your virtual memory to another drive?

For most people, especially those with enough RAM and a modern SSD, letting Windows manage the pagefile automatically works just fine. Changing these settings is usually only needed for special cases like not having enough SSD space or other specific needs.

How to move virtual memory (pagefile) to a different drive in Windows 11

The following steps will show you how you can move your virtual memory from your main drive to another one of your choice in Windows 11.

  1. Right-click on “This PC” and pick “Properties”. Then, click on “Advanced system settings” to open the System Properties dialog box. You can also search for and open “Advanced system settings” from the Start menu.View Advanced System Settings Start menu
  2. In the System Properties dialog box, go to the “Advanced” tab. Find the “Performance” section. Click on “Settings” to open the Performance Options window.Windows 11 Virtual Memory Settings
  3. Stay on the “Advanced” tab in the Performance Options window, and look at the “Virtual memory” section. Click on “Change” to adjust the virtual memory settings.Change virtual memory pagefile to another drive Windows 11
  4. Uncheck “Automatically manage paging file size for all drives“.Uncheck Automatical paging file management
  5. Pick your main drive (usually C:). Click on “No paging file”, then click “Set”. This tells Windows to stop using the main drive for virtual memory.Disable virtual memory or pagefile on C drive
  6. Choose the drive where you want the pagefile. Set a custom size or pick “System managed size“, and then click “Set“.How to move virtual memory (pagefile) to a different drive in Windows 11
  7. After setting everything up, click “OK” to apply the changes. You might need to restart your computer to make these changes work.Restart computer to take effect
  8. Once you restart, check if the pagefile.sys (virtual memory file) is now on the new drive. If you still see a pagefile.sys file on the C: drive, you can safely delete it to free up space.Delete pagefile.sys after moving virtual memory to another drive

Useful guide: How to Clear RAM Cache in Windows 11

Things to consider when moving your system’s virtual memory

Moving the pagefile to a slower drive can slow down your system. Ideally, it should be on the fastest drive you have, especially if your system uses virtual memory a lot.

It’s also a good idea to set both the initial and maximum sizes of the pagefile to the same value on the new drive. This stops the pagefile from getting bigger and smaller, which can cause problems and slow down your computer.

How large should I set the pagefile in Windows 11

If you have more than one extra drive, you can spread the pagefile across these drives. This can be good if each drive works differently or if you want to even out the wear on multiple drives.

Is it better to have multiple paging files on different drives

If things seem slower or there are problems like crashing after you made the changes, you might need to change the size of the pagefile or move it back to the original drive.

Linked issue: Memory_Management ntoskrnl.exe BSOD on Windows 11 or 10

Know that some big updates to Windows might change some these system settings. After such updates, you might want to check if your virtual memory settings are still the way you set them.

Sometimes, after a reboot, Windows might make a temporary paging file on the old drive if there are problems with the new setup. This can happen if the new drive isn’t right for a paging file or if something wasn’t set up correctly.

Read next: What Files Can You Delete from C: Drive to Free Up Space?

Frequently Asked Questions

Does using virtual memory shorten the life of an SSD?

SSDs are built to handle a lot of data writing. Using virtual memory doesn’t really shorten an SSD’s life by much. Most of the time, people get a new SSD for other reasons, long before it wears out.

Can I shift virtual memory to an external drive?

Moving the pagefile to an external drive is generally not a good idea because it might not connect well and is slower than internal drives.

Does moving the pagefile boost gaming performance?

It could help, especially if you’re moving it to a faster drive and your computer always uses a lot of virtual memory while gaming. But, the difference isn’t always noticeable.

Will moving the paging file to an HDD make my computer slower?

If you switch the paging file from an SSD to an HDD, your computer might slow down when it uses the paging file (or when it runs out of RAM) since HDDs are generally slower than SSDs. But if your computer has enough RAM, you probably won’t notice much because the paging file won’t be used as much.

Should I set virtual memory settings myself?

In most cases, you will want to just let Windows handle the virtual memory automatically for you and it should work just fine. But if you have a specific reason that you want to set a certain number of page file sizes, perhaps due to limited space, you can do so. Just make sure to monitor your PC for problems after that.

How do I figure out the best size for the paging file?

Windows does a good job on its own figuring out how big the paging file should be. If you want to set it yourself, a good start is to make it 1.5 times the size of your RAM and no more than 3 times your RAM. But this can change depending on how you use your computer and what it’s like.

Can I turn off the paging file completely?

It’s usually not a good idea to disable the paging file completely, even if you have lots of RAM. Some programs and parts of Windows still need the paging file to work correctly. Turning it off can make your computer unstable.

Is it okay to remove the pagefile from the main drive?

Yes, but make sure you’ve moved it to another drive and set up Windows to use the new location first.

What if I get errors after moving the paging file?

If you get errors or see a message about a temporary paging file, it might mean there’s something wrong with how you set up the new paging file. Go back to the old settings and check that the new drive is set up correctly for paging.

Categories: DiskGamingWindows 11

Nyau Wai Hoe
Nyau Wai Hoe is the Founder and Chief Editor of With a degree in software engineering and over 12 years of experience in the tech support industry, Nyau has established himself as an expert in the field, with a primary focus on the Microsoft Windows operating system. As a tech enthusiast, he loves exploring new technologies and leveraging them to solve real-life problems.

Share via
Copy link