Adjust Virtual Memory on windows 10 or windows 11 (A Quick Guide)

Windows uses virtual memory to supplement your installed RAM. If your system feels sluggish or you get memory-related errors, tweaking virtual memory settings can help. This guide walks you through adjusting the pagefile on Windows 10 and Windows 11 to optimize performance and stability.

What Is Virtual Memory and Why Adjust It?

Virtual memory combines your physical RAM with a hidden file on your hard drive, called the pagefile. When Windows runs out of real memory, it uses the pagefile to temporarily store data. This prevents crashes and lets you run more applications at once. However, if the pagefile is too small, you may see errors like 'Your system is low on virtual memory.' If it’s too large, you might waste disk space.

Most users never need to touch virtual memory. Windows dynamically manages it by default, but manual adjustments can help if you run demanding software, have low RAM, or want to troubleshoot slow performance. For example, video editors, 3D programs, or virtual machines often benefit from a larger pagefile.

Finding Your Current Virtual Memory Settings

Before you make changes, check your current virtual memory settings. On Windows 10 or 11, press Windows + R, type sysdm.cpl, and hit Enter. In the System Properties window, go to the Advanced tab and click Settings under Performance. Then switch to the Advanced tab again and click Change under Virtual memory.

Here you’ll see if Windows is managing the pagefile automatically, and the current size (in MB). This information helps you decide whether an adjustment is needed, especially if you notice your system using most of its available memory.

Should You Let Windows Manage Virtual Memory?

By default, Windows automatically manages the pagefile, adjusting its size based on your system’s needs. For most users, this is the safest option. Windows typically sets the pagefile to around 1.5 times your installed RAM, and increases it if required. If you rarely run into memory errors or performance issues, leaving this setting alone is usually best.

However, if you have specific needs or notice slowdowns, you might benefit from manual control. For example, some users with SSDs prefer to limit pagefile size to reduce disk wear, while others with limited disk space shrink the pagefile. If you use software that regularly exceeds your RAM, manually increasing the pagefile can prevent crashes.

How to Adjust Virtual Memory Size Manually

To change your virtual memory size, open the Virtual Memory window as described above. Uncheck Automatically manage paging file size for all drives. Select the drive where Windows is installed (usually C:), then choose Custom size. Here you can enter values for Initial size and Maximum size in megabytes.

As a general rule, set the initial size to your installed RAM (in MB), and the maximum to up to 1.5 to 3 times your RAM. For example, if you have 8 GB of RAM, enter 8192 MB as the initial size and up to 24576 MB as the maximum. After entering your sizes, click Set, then OK, and restart your computer for the changes to take effect.

Best Practices for Setting Pagefile Size

Choosing the right pagefile size depends on your hardware and usage. Too small, and you risk out-of-memory errors; too large, and you may waste space or slow down SSDs. Here are some practical guidelines:

  • If you have 4 GB RAM or less, use at least 4096 MB as initial size and up to 8192 MB maximum.
  • For 8 GB RAM, set initial to 8192 MB, maximum 16384-24576 MB.
  • With 16 GB RAM or more, you can often get by with a smaller pagefile (e.g., 4096-12288 MB), but some memory-hungry apps may still need more.

If you use hibernation, ensure sufficient free space for both the pagefile and hibernation file. Avoid disabling the pagefile entirely - some programs expect it and may crash if it’s missing.

Troubleshooting Pagefile Issues

Sometimes, adjusting virtual memory causes new problems. If you see errors like 'Windows created a temporary paging file,' it usually means the pagefile settings are too restrictive, or the disk is full. Double-check that your drive has enough free space and that the maximum pagefile size is set high enough. If you see slow performance after shrinking the pagefile, try increasing it or letting Windows manage it again.

If Windows won’t boot after a change, boot into Safe Mode and restore the default settings. Occasionally, antivirus or disk corruption can interfere with the pagefile. Running chkdsk /f and temporarily disabling security software can help if problems persist.

SSD vs HDD: Does It Matter Where the Pagefile Goes?

If you have both an SSD and an HDD, you might wonder where to place the pagefile. SSDs are much faster than HDDs, so having the pagefile on an SSD gives better performance. Modern SSDs handle pagefile writes without issue, but heavy constant paging can wear down older SSDs faster.

If your SSD is small and you need to save space, you can move the pagefile to an HDD, but expect slower performance when Windows needs to use it. For most people, keeping the pagefile on the system SSD and letting Windows manage it is both safe and optimal. Only advanced users who know their workload should tinker further.

Frequently asked questions

Is it safe to disable the pagefile in Windows 10 or 11?

Disabling the pagefile isn’t recommended. Some apps and drivers require it, and you may get out-of-memory errors even if you have lots of RAM.

Should I set the same value for initial and maximum pagefile size?

Setting both values the same can reduce pagefile fragmentation, but it’s not required. Most users won’t notice a difference unless running performance benchmarks.

Do I need to restart my PC after changing virtual memory settings?

Yes, you must restart your computer for the new pagefile settings to take effect.

How do I know if my pagefile is too small?

You’ll see errors like 'low on virtual memory' or programs crashing unexpectedly. Increasing the pagefile size usually resolves these issues.