How to Change Virtual Memory (Paging File) in Windows 11 (2026 Guide)

how to change virtual memory in Windows

Virtual memory, also known as the paging file, is a built-in Windows feature that helps your PC continue running smoothly when physical RAM starts running low. Instead of closing applications or displaying “out of memory” errors, Windows temporarily moves less-used data from RAM to a hidden file on your storage drive called pagefile.sys. In most cases, Windows 11 automatically manages the paging file and chooses the best size based on your system configuration. However, if you’re experiencing memory-related errors, application crashes, or running demanding software such as video editors or virtual machines, you may need to adjust the virtual memory settings manually. In this guide, you’ll learn what virtual memory is, how the Windows paging file works, when you should change its size, and how to safely increase or decrease virtual memory in Windows 11.

What Is Virtual Memory?

Virtual memory is a memory management feature built into Windows that uses part of your storage drive as temporary memory when your computer’s physical RAM becomes full. It works through a hidden system file called pagefile.sys, also known as the paging file.

Normally, Windows stores the data used by running programs in RAM because it is much faster than a hard drive or SSD. However, when many applications are open and available RAM starts running low, Windows moves less frequently used memory data to the paging file. This frees up RAM for active tasks and helps your computer continue running without closing programs unexpectedly.

Increase Virtual Memory windows 11

Although virtual memory improves system stability and allows Windows to handle larger workloads, it is much slower than physical RAM because it relies on your storage drive. For this reason, virtual memory should be viewed as a backup for RAM rather than a replacement. If your PC frequently runs out of memory, upgrading your RAM makes a difference rather than simply increasing the paging file size.

How Does Virtual Memory Work?

Every program you open uses your computer’s RAM (Random Access Memory) to store data that the processor (CPU) needs quick access to. Since RAM is much faster than a hard drive or SSD, Windows keeps active applications in memory for the best performance.

However, RAM has limited capacity. When it starts to fill up, Windows automatically moves less used memory pages from RAM to the pagefile.sys file on your storage drive. This process, known as paging, frees up RAM for the applications you’re actively using while keeping background programs available.

The simplified process looks like this:

How Does Virtual Memory Work

This happens automatically in the background, and most users never notice it. However, because SSDs and hard drives are much slower than RAM, your computer may become less responsive if it relies heavily on virtual memory. If this happens regularly, adding more physical RAM is the most effective long-term solution.

What Is the Paging File (pagefile.sys)?

The paging file (pagefile.sys) is a hidden system file that Windows uses to implement virtual memory. When your computer runs low on physical RAM, Windows temporarily stores less frequently used memory pages in this file to free up RAM for active applications.

By default, pagefile.sys is created automatically on the drive where Windows is installed (usually the C: drive). Most users never see it because it is hidden and protected by the operating system.

Here are some key facts about the paging file:

  • Hidden system file: It isn’t visible in File Explorer unless hidden and protected operating system files are displayed.
  • Created automatically: Windows creates and manages it by default based on your system’s memory requirements.
  • Usually stored on the system drive: The paging file is typically located on the drive where Windows is installed, although advanced users can move it to another drive if necessary.
  • Used only when needed: Windows uses the paging file primarily when available RAM becomes limited. It doesn’t replace RAM during normal operation.
  • Supports system crash dumps: Windows also uses the paging file to create memory dump files after a Blue Screen of Death (BSOD), which helps diagnose system crashes.

Important: The paging file is a safety net, not a performance booster. It helps Windows remain stable when memory is low, but it cannot match the speed of physical RAM. If your PC frequently relies on virtual memory, adding more RAM is the best long-term solution.

Should You Change Virtual Memory in Windows 11?

For most users, no. Windows 11 automatically manages the paging file and adjusts its size based on your system configuration and workload. In most situations, leaving this setting on Automatically manage paging file size for all drives provides the best balance between performance and stability.

Windows virtual memory

However, there are certain situations where manually changing the virtual memory size can be helpful.

SituationRecommendation
Everyday browsing, office work, and streamingLeave it on Automatic
GamingAutomatic is recommended
Video editing, 3D rendering, or CAD softwareIncrease only if the software recommends it or you experience memory-related errors
Running virtual machinesA larger paging file may improve system stability when RAM is heavily used
Receiving “Out of Memory” or “Low Virtual Memory” errorsIncreasing the paging file may temporarily resolve the issue
Older PCs with 4 GB or 8 GB RAMA manually configured paging file may help prevent crashes when running multiple applications

While increasing virtual memory can reduce memory-related errors and improve system stability, it does not make your computer faster. Since the paging file is stored on an SSD or hard drive, it is much slower than physical RAM.

How to Change Virtual Memory (Paging File) in Windows 11

Changing the virtual memory settings only takes a few minutes. Before you stat, save any open work, as you’ll need to restart your computer for the changes to take effect.

Step 1: Open the Virtual Memory Settings

  1. Press Windows + R to open the Run dialog.
  2. Type sysdm.cpl and click OK.
  3. In the System Properties window, open the Advanced tab.
  4. Under Performance, click Settings.
System properties advanced windows 11

Step 2: Open the Virtual Memory Window

  1. In the Performance Options window, select the Advanced tab.
  2. Under Virtual memory, click Change.
Change virtual memory option

Step 3: Disable Automatic Management

By default, Windows automatically manages the paging file size for all drives.

To configure it manually:

  1. Uncheck Automatically manage paging file size for all drives.
  2. Select the drive where you want to store the paging file (usually C:).

Step 4: Set a Custom Paging File Size

  1. Select Custom size.
  2. Enter the values for:
    • Initial size (MB)
    • Maximum size (MB)
  3. Click Set, then OK.
Set virtual memory windows 11

Step 5: Restart Your Computer

Restart Windows 11 to apply the new virtual memory settings. After restarting, Windows will start using the updated paging file configuration.

What Size Should You Set for Virtual Memory?

Windows 11 automatically adjusts the paging file size based on your system’s available RAM, storage space, and current workload. For most users, letting Windows manage the paging file automatically is the recommended option.

You may have seen older guides suggesting that virtual memory should be set to 1.5 to 3 times the amount of installed RAM. While this was a common recommendation for older versions of Windows, modern versions of Windows 11 manage virtual memory much more efficiently, so manually following this formula is usually unnecessary.

The table below provides general recommendations for typical Windows 11 systems.

Installed RAMRecommended Setting
4 GBLeave it on Automatic. Increase manually only if you experience “Out of Memory” errors or application crashes.
8 GBAutomatic is recommended for most users.
16 GBKeep the paging file automatically managed.
32 GB or moreAutomatic management remains the best choice unless a specific application recommends otherwise.

When Should You Increase the Paging File?

Consider increasing the virtual memory size only if you:

  • Frequently receive “Out of Memory” or “Low Virtual Memory” errors.
  • Run memory-intensive applications such as video editors, CAD software, or virtual machines.
  • Experience application crashes caused by insufficient available memory.
  • Cannot upgrade your RAM immediately and need a temporary solution.

Tip: Increasing the paging file can improve system stability when RAM is exhausted, but it won’t make your computer significantly faster. If your PC regularly runs out of memory, installing additional RAM is the most effective solution.

Can You Disable Virtual Memory?

Yes, Windows 11 allows you to disable the paging file, but it isn’t recommended for most users.

Even if your computer has plenty of RAM, the paging file serves important purposes beyond providing extra memory. Windows and some applications expect it to be available, and it is also used to create memory dump files that help diagnose system crashes.

Disabling virtual memory may lead to:

  • “Out of Memory” errors when RAM is exhausted.
  • Unexpected application crashes or instability.
  • Inability to create memory dump files after a Blue Screen of Death (BSOD).
  • Reduced system stability when running memory-intensive programs.

If you have 16 GB or more of RAM, you may rarely notice Windows using the paging file during everyday tasks. However, keeping it enabled allows Windows to manage memory more efficiently when needed.

Recommendation: Unless you’re troubleshooting a specific issue or following guidance from a software vendor, leave the paging file enabled and let Windows manage it automatically.

Frequently Asked Questions

Does increasing virtual memory improve performance?

Not usually. Increasing virtual memory helps Windows prevent “Out of Memory” errors and improves system stability when physical RAM is exhausted, but it cannot match the speed of RAM. If your computer frequently runs out of memory, upgrading your RAM is the better long-term solution.

Can virtual memory replace RAM?

No. Virtual memory is designed to supplement physical RAM, not replace it. Because it uses your SSD or hard drive, it is significantly slower than RAM and should only be considered a backup when memory runs low.

Why is pagefile.sys so large?

Windows automatically increases or decreases the size of pagefile.sys depending on your installed RAM, available storage, and current workload. A large paging file is usually normal and helps ensure system stability.

Is it safe to change the paging file size?

Yes. Windows allows you to change the paging file size safely. However, for most users, the recommended setting is to let Windows manage it automatically unless you’re experiencing memory-related issues or a specific application requires a larger paging file.

Can I disable virtual memory?

Yes, but it isn’t recommended for most users. Disabling the paging file can cause memory-related errors, application crashes, and prevent Windows from creating memory dump files after a system crash. Keeping the paging file enabled provides the best balance of performance and stability.

Amiush Palk

I am Amiush founder of this blog. My qualification. completed Bachelor of Arts (BA) and Microsoft Certified Professional (MCP). With a strong background in computer applications love write articles on Microsoft Windows (11, 10, etc.) Cybersecurity, WordPress and more.