How to Reduce Pagefile.sys Size in Windows 11
In this article
You can reduce pagefile.sys in Windows 11 by opening System Properties, going to the Advanced tab, clicking Performance Settings, then Advanced, then Change under Virtual memory, and setting a custom size for your system drive. The file cannot be deleted or shrunk to nothing while Windows is running, because Windows uses it as overflow memory when RAM fills up. A smaller pagefile saves disk space, but set it too low and Windows will warn you, apps may slow down when memory gets tight, and crash dumps stop being written. Before you start, close open programs and make a note of your current settings so you can put them back if something feels wrong.
What You'll Need
- Administrator rights on the Windows 11 PC (the Virtual memory dialog needs them).
- Roughly 5–10 minutes, plus a restart at the end.
- Your total installed RAM in mind, since the custom size is entered in megabytes.
- Enough free disk space to hold the new, smaller file, and ideally enough to restore the old size if you change your mind.
Step-by-Step
- Press Windows + R, type sysdm.cpl and press Enter. This opens System Properties directly, which is faster than hunting through Settings.
- Select the Advanced tab, then click Settings under the Performance section.
- In Performance Options, open the Advanced tab and click Change under Virtual memory. Menu labels can differ slightly by Windows 11 version and region, but these names have stayed stable.
- Clear the checkbox labelled Automatically manage paging file size for all drives. Without this, Windows ignores whatever you type next.
- Select your system drive (usually C:) in the list of drives.
- Choose Custom size and enter an initial size and a maximum size in megabytes. A common approach is to set both to the same value so the file stays fixed and never grows. For example, 4096 for 4 GB. Keep the initial size at least a few hundred MB; going below about 800 MB is risky on a modern Windows 11 install.
- Click Set. The value only applies once you click this button, not when you type it.
- Click OK through each open dialog. Windows will tell you a restart is required.
- Restart the PC. After the reboot, open File Explorer, go to View > Show > Hidden items and look at the root of C: to confirm pagefile.sys is now smaller.
If you have more than one drive, you can also move the pagefile to a secondary drive instead of shrinking it. Select the second drive, set a custom size there, click Set, then select C: and choose No paging file before clicking Set again. Do not remove the pagefile from every drive at once; Windows needs at least one.
Common Mistakes
- Forgetting to click Set. Typing a value and clicking OK without Set leaves the old size in place, and people conclude the change did not work.
- Disabling the pagefile entirely. Some guides suggest No paging file on every drive. This can cause out-of-memory errors in apps that reserve virtual memory even when plenty of RAM is free, and it stops Windows from writing crash dumps.
- Setting the maximum below the initial size. Windows will reject it or silently adjust it, so keep maximum equal to or larger than initial.
- Expecting the file to vanish. pagefile.sys is a protected system file; it stays on disk at the size you set.
- Shrinking it on a low-RAM machine. On a PC with 8 GB or less, a small pagefile pushes more pressure onto RAM and can make multitasking stutter.
Tips
- Check how much pagefile Windows actually uses before shrinking it. Open Task Manager, go to the Performance tab, select Memory, and look at the Committed figure. If committed memory regularly sits well above your installed RAM, the pagefile is doing real work and should stay reasonably large.
- A fixed size equal to initial and maximum avoids fragmentation and repeated resizing, which is slightly kinder to an SSD.
- If you mainly want to free space, look for other wins first: Disk Cleanup, Storage Sense, old Windows update files and hiberfil.sys (disabled through powercfg /h off in an administrator Command Prompt) often recover more space with less risk.
- Write down your original settings before changing anything, including whether automatic management was on. Restoring is then a two-minute job.
- Keep the pagefile on a fast drive. Moving it to a slow external or network drive makes memory pressure far worse.
Troubleshooting
The size did not change after restart. Reopen the Virtual memory dialog and confirm the automatic checkbox is still cleared and your drive shows the custom values. If another drive also has a system-managed pagefile, Windows may keep a larger total; check every drive in the list.
Windows shows a low virtual memory warning. This means the committed memory demand exceeded the limit you set. Raise the maximum size, or set it back to system managed. Do not ignore the warning; apps can close without saving.
The PC feels sluggish after shrinking. Restore a larger size or re-enable automatic management. Sluggishness under load is the clearest sign the pagefile was earning its space.
You cannot clear the automatic checkbox. The dialog needs administrator rights. Make sure you are signed in with an admin account and that the Change button opened a dialog you can edit; if it is greyed out, your organisation may manage these settings by policy.
You want the old setup back. Return to the same dialog, tick Automatically manage paging file size for all drives, click OK and restart. Windows will rebuild the file at its own chosen size.
Frequently Asked Questions
Can I delete pagefile.sys to free space?
No. It is in use by Windows while the system runs, and deleting it is blocked. You can only change its size or move it to another drive through the Virtual memory settings.
What is a safe minimum size?
There is no universal number, but staying at or above roughly 800 MB to 1 GB avoids the most common out-of-memory problems on a typical Windows 11 install. Machines with less RAM should keep it larger.
Does a smaller pagefile improve performance?
Usually not. It frees disk space, but performance only improves in narrow cases, such as a nearly full system drive. In most cases a smaller pagefile slightly reduces headroom.
Will shrinking it break crash dumps?
A small pagefile can prevent Windows from writing a full memory dump after a blue screen. If you troubleshoot crashes, keep the pagefile large enough or use the system-managed setting.
Can I move pagefile.sys to another drive?
Yes. Set a custom size on the second drive, click Set, then set the system drive to No paging file and click Set. Keep at least one pagefile active somewhere.
Do I need to restart?
Yes. The change takes effect only after a restart, because Windows cannot resize a file it is actively using.