Whether you should enable virtual memory (pagefile.sys), how large to set it, and whether to put it on C or another drive is something almost every Windows user agonizes over. The short answer up front is this: most people should let Windows manage it automatically and not turn it off manually. Here is the full picture, from how it works to the correct settings.

What the page file actually is

The page file is C:\pagefile.sys (hidden by default), a reserved block of space on your drive. Windows uses it as a fallback for RAM. When physical memory runs low, it moves less-used data to the disk to free up RAM for the active program.

It is not a cache for speed. It is the safety net when memory overflows. Its presence also lets the system write a blue screen memory dump, which is essential for diagnosing crashes. See Blue Screen Restarts Too Fast to Read for how to set that up. Back when machines had only 2GB to 4GB of RAM it was critical. With 8GB or 16GB now common, its role is smaller, but it is not something you should casually delete.

Can you turn it off? In most cases, no

The popular advice to disable virtual memory for speed is a myth. Common consequences of turning it off:

  1. Some programs crash. Photoshop, virtual machines, games, Chrome with many tabs, and certain developer tools will throw out-of-memory errors or quit when memory is tight.
  2. No blue screen dump can be created, so you cannot even diagnose a problem when something breaks.
  3. When RAM is exhausted the machine freezes outright instead of paging gracefully, which is worse.

There is only one situation where turning it off is worth considering: you have 16GB or more of RAM, run on an NVMe SSD, never run heavy software, and you understand the trade-off. Even then, keeping a fixed 2GB to 4GB page file is safer than disabling it completely.

How large should it be (by RAM size)

Microsoft no longer recommends the old 1.5x or 3x RAM formula. It suggests letting the system manage it. As a rule of thumb:

Physical RAMSuggested approach
4GB or lessLet the system manage, or set 4GB to 8GB fixed, do not disable
8GBLet the system manage, the default is usually fine
16GB or moreSystem manage is fine; to save C drive space set a fixed 4GB to 8GB
32GB or moreManage or keep a small fixed 2GB to 4GB, no need for more

If you regularly run large software, virtual machines, or rendering, err on the larger side. To check your RAM size and whether it is the bottleneck first, see How to Check Your PC's Specs, Model and Serial Number.

How to change it (two methods)

Method A (recommended, most intuitive):

  1. Press Win + R, type sysdm.cpl, and press Enter. Go to the Advanced tab and click Settings under Performance.
  2. Click Advanced again, then Change under Virtual Memory.
  3. By default Automatically manage paging file size for all drives is checked. Uncheck it first to customize.
  4. Select C drive, choose System managed size or Custom size (set initial and maximum to the same value to avoid fragmentation), click Set, then OK, and restart.

Method B: Settings > System > About > Advanced system settings in the related links on the right, then the same Performance path.

C drive is full, move the page file to D

The page file can occupy several GB, and when C is red it can be moved (unlike the hibernation file, which is tightly coupled). Steps:

  1. In the Virtual Memory window above, first select C drive, choose No paging file, and click Set.
  2. Then select D drive (or another disk), choose System managed size or a custom value, and click Set.
  3. Confirm and restart.

Make sure D is an SSD that stays online. If D is a plug-and-play external drive, the system may fail to find the page file at startup and throw an error. Since the page file writes continuously to an SSD, watch disk health as explained in SSD Optimization and Hard Drive Health (SMART) Check.

Low virtual memory warning, how to fix

Two common causes:

  • The page file is too small or disabled, so enlarge it or restore system management per the section above.
  • Real memory shortage plus too many programs open, so close memory-hungry apps (check Task Manager) or add RAM.

Common myths clarified

  • A larger page file makes the PC faster? Wrong. It is orders of magnitude slower than RAM, so a larger file only means it can absorb more memory pressure, not more speed.
  • Disabling it extends SSD life? Modern SSDs are durable enough that page file writes barely affect lifespan, and the stability cost is not worth it.
  • With more than 8GB of RAM you do not need it? Many programs still depend on it.
  • Slow boot is caused by the page file? Slow boot has other causes such as startup items, the drive, and updates, and has little to do with the page file.

A note on gaming and large memory

If you do a lot of video editing, run virtual machines, or play mod-heavy games, do not set the page file too small. When the working set exceeds RAM, a cramped page file forces constant disk thrashing that feels worse than slightly slower memory. A practical middle ground is to let the system manage it and, if C is tight, move it to a fast SSD rather than disabling it. Keep in mind that the hibernation file (hiberfil.sys) is separate from the page file and is what Windows uses for fast startup and sleep; trimming the page file does not shrink hibernation.

Summary

Do not disable virtual memory on a whim. With 8GB to 16GB of RAM, let Windows manage it automatically. If you have lots of RAM and a tight C drive, set a small fixed value or move it to D. It absorbs memory spikes and supports crash analysis, making it the system's safety net rather than dead weight.