How to Change Virtual Memory in Windows 11

To change virtual memory in Windows 11, search for View advanced system settings, open the Advanced tab, select Settings under Performance, open the second Advanced tab, and select Change in the Virtual memory area. For most PCs the best setting is the one Windows starts with: Automatically manage paging file size for all drives.

Applies to: Windows 11. Checked against Microsoft Support on October 7, 2026.

What virtual memory is, and when to change it

Virtual memory in Windows relies on the paging file, also called the page file. Microsoft describes it as an area on your drive that Windows uses like memory. It is a hidden system file, and on most PCs it sits on the C: drive under the name pagefile.sys.

The paging file does two jobs. It lets Windows move data that hasn’t been used for a while out of RAM, so the faster physical memory is free for the apps you are using right now. It also gives Windows somewhere to write a crash dump, the file that records what happened when the PC stops with a blue screen.

Windows 11 sizes the file for you, and that is the right choice in most cases. A manual setting makes sense in a few situations:

  • Someone set a custom size in the past and the PC now runs out of memory or disk space.
  • A specific app or a support technician asks for a minimum paging file size.
  • You need a complete memory dump to troubleshoot crashes.
  • The system drive is nearly full and you want the paging file on another drive.

A bigger paging file is not extra RAM. Storage is much slower than memory, so a PC that leans on the paging file all day will still feel slow.

Before you start

  • Sign in with an administrator account. Microsoft’s instructions for this setting call for an account in the Administrators group.
  • Save your work. The new size takes effect after a restart.
  • Know how much RAM the PC has and how much free space is on the drive. Sizes in this window are entered in megabytes (MB), and 1 GB equals 1,024 MB.

How to change virtual memory in Windows 11

  1. Select Search on the taskbar, type advanced system, and select View advanced system settings (it has Control panel listed underneath). The System Properties window opens.
  2. On the Advanced tab, find the Performance area and select Settings. The Performance Options window opens.
  3. Select the Advanced tab in that window, then select Change in the Virtual memory area. The Virtual Memory window opens.
  4. Clear the Automatically manage paging file size for all drives check box. The drive list and the size options below it become available.
  5. Select the drive you want to change, usually C:.
  6. Choose the custom size option and type an initial size and a maximum size in megabytes. To let Windows pick the size for only this drive, choose System managed size instead.
  7. Select Set to apply the choice to the selected drive. This step is easy to miss.
  8. Select OK in each open window, then restart the PC with Start > Power > Restart.
Illustration of the path to the Virtual memory settings in Windows 11, from View advanced system settings to Change and Set
Illustration: the path from View advanced system settings to the Virtual memory options in Windows 11.

What size should the paging file be?

Many guides repeat an old rule of 1.5 times your RAM for the initial size and 3 times for the maximum. Microsoft’s current page file sizing article for Windows does not give a fixed multiple of RAM. It ties the size to what the PC really uses and to the kind of crash dump you want.

It helps to know what Windows does on its own. According to Microsoft Learn, a system-managed paging file works like this:

Setting How Windows decides
Minimum size Varies with past page file use, the amount of RAM (RAM divided by 8, up to 32 GB) and the crash dump settings
Maximum size 3 times RAM or 4 GB, whichever is larger, capped at one-eighth of the drive’s size
When it grows When the memory Windows has promised to apps reaches 90 percent of the limit, as long as there is free disk space

That limit, called the system commit limit, is the PC’s RAM plus all of its paging files. So a custom size smaller than what Windows would pick lowers the limit, and a larger one raises it.

If you need a number, use the requirement that prompted the change:

  • An app or vendor requirement: enter the size they give you.
  • A complete memory dump: Microsoft lists the minimum as 1 times RAM plus 257 MB. On a PC with 16 GB of RAM, that is 16 x 1,024 = 16,384 MB, plus 257 MB, for an initial size of at least 16,641 MB.
  • A small memory dump: the minimum is only 1 MB, so crash dumps alone are no reason for a huge file.
  • No specific requirement: leave the size to Windows.

Whatever you type, leave room on the drive. If the paging file would crowd out everything else, free up disk space in Windows 11 first.

Move the paging file to another drive

Use this only when the system drive is short on space and a second internal drive has plenty. Open the Virtual Memory window with steps 1 to 4 above, then do the following.

  1. Select the drive that should hold the paging file, select System managed size, and then select Set.
  2. Select the C: drive, select No paging file, and then select Set.
  3. Select OK and restart the PC.

Keep crash dumps in mind before you do this. Microsoft’s memory dump documentation says a small memory dump needs a paging file on the boot volume, the drive Windows starts from. If you rely on dump files, keep a paging file on C: as well.

Check that it worked, or go back to automatic

After the restart, repeat steps 1 to 3. The Virtual Memory window lists each drive with its paging file setting, so you can confirm the size you entered.

You can also read the live numbers. Open a PowerShell window and run this command:

Get-CimInstance -ClassName Win32_PageFileUsage

The result shows the file’s name plus AllocatedBaseSize (the space set aside), CurrentUsage and PeakUsage, all in megabytes. If the peak figure stays far below the allocated size over a few days of normal work, a bigger file won’t help.

To undo a custom size, open the Virtual Memory window again, select the Automatically manage paging file size for all drives check box, select OK, and restart. This is the fix Microsoft recommends in its tips to improve PC performance in Windows.

Troubleshooting

The size options are greyed out

The automatic check box at the top is still selected. Clear it and the drive list and size options become available.

You don’t have permission to change the setting

Changing the paging file needs an account in the Administrators group. On a work or school PC, the IT department may manage this setting, so ask them before changing it.

The size didn’t change after selecting OK

Either Set was skipped before OK, or the PC hasn’t been restarted yet. Enter the values again, select Set, and restart.

The drive doesn’t have enough free space

Windows can’t create a paging file larger than the free space on the drive. Lower the maximum size, clear some space, or choose System managed size.

A wmic command from an older guide doesn’t work

Older tutorials change the paging file with the wmic tool. Microsoft has removed WMIC from Windows 11, version 24H2 and later, so those commands fail on a current PC. Use the Virtual Memory window, or PowerShell’s CIM commands as shown above.

The PC is still slow or still runs out of memory

The paging file is a safety net. Close the apps that use the most memory, restart the PC, and consider more RAM if it happens every day. Our guide on how to clear memory (RAM) on Windows 11 covers the safe ways to do that.

Frequently asked questions

Is it safe to change virtual memory in Windows 11?

Yes. The setting is built into Windows and is easy to reverse. A size that is too small can cause out-of-memory errors, and selecting the automatic check box again puts things back.

Should I turn the paging file off if I have a lot of RAM?

No. Microsoft describes the page file as optional, but some products require one, and Windows uses it to support crash dumps. Without it, the commit limit drops to the amount of RAM alone.

Does increasing virtual memory make a PC faster?

Not by itself. It can stop out-of-memory errors when RAM fills up, but data in the paging file is read from storage, which is slower than RAM.

Why is pagefile.sys so large?

A system-managed file can grow to 3 times your RAM or 4 GB, whichever is larger, within the one-eighth-of-the-drive cap. Windows enlarges it when memory demand is high.

Do I need to restart after changing it?

Yes. Restart the PC so Windows creates the paging file with the new settings.

Are the steps the same in Windows 10?

The Virtual Memory window works the same way. For the Windows 10 walkthrough, see how to change virtual memory in Windows 10.

If you only wanted to fix a bad custom value, turning the automatic check box back on and restarting is all you need. For the sizing details behind this guide, read Microsoft’s article on how to determine the appropriate page file size.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy