WikiGamingPC

When you buy through our links, we may earn a commission. Learn more ›

How to Set Windows Virtual Memory for Gaming

Short answer: Virtual memory uses a portion of your storage drive as extra RAM when system memory is full. Windows manages the page file automatically, but manually setting a fixed size can prevent performance dips in memory-intensive games. This guide explains how to adjust the page file size in Windows 11 and when it helps your gaming PC.

What is virtual memory and why it matters for gaming

Virtual memory is a system feature that uses a portion of your storage drive, called the page file (pagefile.sys), as an overflow area for data that cannot fit in physical RAM. When your system runs out of available memory, Windows moves less frequently used data from RAM to the page file, freeing up space for active applications.

For gaming, virtual memory becomes important when a game or background tasks (such as a streaming application or voice chat) consume most of your installed RAM. If the page file is too small or poorly configured, the system may experience instability or crashes. A properly sized page file helps maintain a reliable environment, especially on systems with limited memory.

Windows 11 requires a minimum of 4 GB of RAM, but many gaming PCs ship with 16 GB or more, as noted in the Windows 11 specifications. The page file works alongside your physical memory, so understanding how to adjust it can give you more control over your system's behavior under heavy loads.

How Windows manages the page file by default

By default, Windows 11 automatically manages the page file size. It sets an initial size based on the amount of installed RAM and allows the file to grow as needed. This dynamic approach works well for most everyday tasks and many games.

However, automatic management can lead to fragmentation because the page file expands and contracts over time. On systems with limited storage space, the automatic growth may also compete with game installations and updates. For gaming PCs that run memory-intensive titles or multitask heavily (for example, streaming while playing), a fixed page file size can provide more predictable behavior.

The Windows 11 system requirements list a minimum of 64 GB of storage, and the page file resides on that drive. Using a fast SSD for your operating system and games helps virtual memory perform better, as the page file benefits from quick read and write speeds.

When to manually adjust virtual memory for gaming

Consider manually setting the page file size if you experience any of the following:

• Your system displays "low memory" warnings or games crash with memory-related errors.

• You play large-scale games while running additional software such as a browser, streaming tools, or voice chat, and you notice slowdowns.

• Your gaming PC has 8 GB of RAM or less, and you want to ensure the page file is large enough to handle peak usage.

Manual adjustment is not a substitute for adding more physical RAM, but it can help stabilize a system that is temporarily pushed beyond its memory capacity. If you frequently run out of memory, upgrading to 16 GB or 32 GB, as seen in Copilot+ PC requirements, is a better long-term solution. For guidance on memory configurations, see best RAM for gaming.

Step-by-step guide to change virtual memory settings

Follow these steps to manually set the page file size in Windows 11:

1. Press Win + Pause/Break or right-click This PC in File Explorer and select Properties.

2. Click Advanced system settings on the left side.

3. Under Performance, click Settings.

4. Go to the Advanced tab and under Virtual memory, click Change.

5. Uncheck Automatically manage paging file size for all drives.

6. Select the drive where your Windows installation resides (usually C:).

7. Choose Custom size and enter the same value for Initial size (MB) and Maximum size (MB). Using a fixed size prevents the file from fragmenting.

8. Click Set, then OK, and restart your computer for the changes to take effect.

Choosing the right size depends on your system's RAM and storage capacity. A common approach is to set the page file to a value that is comfortable for your available drive space. For example, if you have 16 GB of RAM and plenty of SSD space, a fixed size of 16 GB (16384 MB) is a reasonable starting point. Adjust upward if you see memory warnings.

Because the page file uses your storage drive, a fast NVMe SSD helps virtual memory performance. Learn more about SSD types for gaming.

What to avoid and additional tips

Do not disable the page file entirely. Some applications and system components expect virtual memory to be available, and disabling it can cause errors or prevent certain games from launching.

Avoid setting the page file too small. A tiny page file may force Windows to constantly swap data, leading to excessive drive wear and poor responsiveness. Conversely, an excessively large page file wastes storage space without providing additional benefit.

If you have 32 GB or more of RAM and rarely see memory usage above 80 percent, leaving the page file on automatic management is usually sufficient. You can monitor your memory usage in Task Manager to decide whether manual adjustment is needed.

For systems with multiple drives, you can move the page file to a secondary SSD to reduce wear on the primary drive. However, keep a small page file on the system drive for crash dump files.

Windows 11 includes features such as optimizations for windowed games and Auto HDR, which can improve the gaming experience without directly affecting virtual memory. Combining these settings with a properly configured page file helps your gaming PC run reliably.

What to pick for your play

If youPickBuying guide
You have 8 GB of RAM and play at 1080pConsider a gaming PC with 16 GB of RAM for smoother multitaskingBest 1080p Gaming PCs in 2026: Picks by Stated Specs
You stream while gamingA gaming PC with 32 GB of RAM handles streaming and gaming togetherBest Gaming PCs for Streaming in 2026: Picks by Stated Specs
You play at 1440p with demanding titles16 GB of RAM is a solid baseline; 32 GB offers more headroomBest 1440p Gaming PCs in 2026: Picks by Stated Specs
You play at 4K or use large mods32 GB of RAM helps avoid memory bottlenecks in large worldsBest 4K Gaming PC in 2026: Picks by Stated Graphics Memory
You want a balanced system for all-around gamingA prebuilt gaming PC with 16 GB of RAM and a fast SSDBest Gaming PC 2026: The Best Prebuilt Gaming PCs at Every Budget

Questions

What is virtual memory?

Virtual memory is a system mechanism that uses a portion of your storage drive as an extension of physical RAM. Windows stores data that does not fit in RAM in a file called pagefile.sys.

Does virtual memory affect gaming performance?

Yes, if the page file is too small or fragmented, games may become unstable. A properly sized page file helps maintain stability, especially on systems with limited memory.

Should I disable the page file?

No. Disabling the page file can cause system instability and prevent some applications from running. Windows and many games expect virtual memory to be available.

How big should I set the page file?

A common starting point is to set the initial and maximum size to the same value, roughly equal to your installed RAM. For example, with 16 GB of RAM, try 16384 MB. Adjust based on your storage space and memory usage.

Will a faster SSD help virtual memory?

Yes. The page file resides on your storage drive, so a fast NVMe SSD reduces the time Windows spends reading and writing data to virtual memory, improving overall responsiveness.

Can I move the page file to another drive?

Yes. In the Virtual Memory settings, you can select a different drive for the page file. Keep a small page file on the system drive for crash dumps, and move the main page file to a secondary SSD if available.

Does Windows 11 handle virtual memory differently than Windows 10?

The core virtual memory system is similar, but Windows 11 includes optimizations for gaming such as Auto HDR and improved windowed game performance. These features do not change how you configure the page file.

Recent updates

  • : First published.

Sources

Related buying guides