
The Windows pagefile, stored as pagefile.sys, is disk space Windows uses as overflow memory when RAM is full. Automatic management is best for most PCs, but a custom size can help with low-memory errors or a nearly full system drive.
These steps apply to Windows 10 and Windows 11 virtual memory settings.
Does This Affect You?
Change the pagefile only when you have a reason: low disk space caused by a large pagefile, repeated out-of-memory errors, or a second internal drive with more room. If the PC works normally, leaving Windows in control is usually best.
Set a Custom Pagefile Size
- Click Start, search for advanced system settings, and open View advanced system settings.
- On the Advanced tab, click Settings under Performance.
- Open the new Advanced tab and click Change under Virtual memory.
- Clear Automatically manage paging file size for all drives.
- Select the drive, usually C:, choose Custom size, and enter initial and maximum sizes in MB.
- Click Set, then OK through the windows and restart.
Move the Pagefile to Another Drive
- Open the Virtual memory window using the steps above.
- Select the main drive, choose No paging file, and click Set. Do not restart yet.
- Select the second internal drive and choose System managed size or Custom size.
- Click Set, close the windows, and restart.
- Avoid moving the pagefile to a slow hard drive if your main drive is an SSD, because Windows can slow down when it needs virtual memory.
Important Pagefile Guidance
When Custom Size Helps
A custom pagefile matters most on PCs with 8 GB of RAM or less, where heavy multitasking can exceed physical memory. On PCs with 16 GB or more, automatic management is usually fine.
Check Actual Usage
Open Task Manager, go to Performance > Memory, and look at Committed. If committed memory regularly approaches installed RAM plus pagefile capacity, increase the pagefile or add RAM.
Do Not Disable It Without a Strong Reason
Turning the pagefile off removes a safety net. Some apps may crash when memory runs out, and Windows may become less stable.
Return to Automatic
Open Virtual Memory again and re-check Automatically manage paging file size for all drives if a custom setting causes problems.
Sources
- Microsoft Support: Determine appropriate page file size
- Microsoft Learn: Virtual memory overview
- Microsoft Support: Fix low memory and performance issues
