Change Pagefile Size & Location in Windows
To change the pagefile size and location in Windows, open System Properties (search for “Advanced system settings”), click Settings under Performance, go to the Advanced tab, and under Virtual memory click Change. From there you can uncheck “Automatically manage paging file size for all drives,” select a drive, choose Custom size or System managed, set the size, and click Set.
What the Pagefile Actually Does
The pagefile (also called the swap file or virtual memory) is a hidden file on your hard drive or SSD that Windows uses as a backup for RAM. When physical memory fills up, Windows moves less-used data from RAM into the pagefile, freeing RAM for active programs. This prevents crashes and lets you run more applications than your RAM alone could handle.
The pagefile is not a replacement for RAM—it is much slower—but it acts as a safety net. Windows manages it automatically by default, but manual control can help in specific situations like low disk space, a full C: drive, or when you want to move it off an SSD to reduce write wear (though this is rarely necessary).
How to Change the Pagefile Size and Location
- Press Win + R, type
sysdm.cpl, and press Enter. - Go to the Advanced tab and click Settings under Performance.
- In the Performance Options window, go to the Advanced tab and click Change under Virtual memory.
- Uncheck Automatically manage paging file size for all drives.
- Select a drive (e.g., D:), choose Custom size, enter an Initial and Maximum size in MB, then click Set.
- Alternatively, choose System managed to let Windows decide, or No paging file to disable it on that drive.
- Click OK and restart your PC for changes to take effect.
If you move the pagefile to another drive, you must set it to No paging file on the original drive, then create it on the new one. Windows requires at least one pagefile on some drive to function properly.
Choosing the Right Size
For most users, leaving the pagefile on System managed is the best option. Windows automatically adjusts it based on RAM usage, crash dumps, and system load. If you want a fixed size, a common recommendation is 1.5 times your RAM for the initial size and 3 times your RAM for the maximum, but this is outdated for modern systems with large RAM.
A more practical approach:
- 8 GB RAM or less: Set initial = 1.5× RAM, maximum = 3× RAM (e.g., 12288 MB initial, 24576 MB max for 8 GB).
- 16 GB RAM: Set initial = 1× RAM, maximum = 2× RAM (e.g., 16384 MB initial, 32768 MB max).
- 32 GB RAM or more: Let Windows manage it, or set a small fixed size (e.g., 2048 MB) to support crash dumps.
If you use memory-intensive apps like video editing or virtual machines, keep the pagefile large enough to avoid “low memory” errors. If you have plenty of RAM and never see high usage, you can reduce the size, but don’t disable it entirely—some applications and Windows features expect it.
Common Problems and Fixes
- “Not enough memory” errors: Increase the pagefile size or move it to a drive with more free space.
- Pagefile can’t be set on a drive: Ensure the drive is formatted as NTFS (the pagefile doesn’t work on FAT32 or exFAT).
- Changes don’t stick after reboot: Make sure you clicked Set before OK, and that you didn’t accidentally select “No paging file” on all drives.
- System won’t create crash dumps: Windows needs a pagefile on the boot drive (usually C:) that is at least as large as your RAM to write a memory dump. Set it to System managed on C: if you want reliable crash dumps.
- Slow performance after moving pagefile: If you moved it to a slower HDD, it may be slower than the original SSD. Keep it on the fastest drive.
SSD Wear and Pagefile Location
A common misconception is that the pagefile causes excessive wear on SSDs. In reality, the pagefile is written to only when RAM is full, which for most users is rare. Modern SSDs have high endurance, and the pagefile is not a significant factor in SSD lifespan. Moving the pagefile to an HDD to “protect” an SSD is usually unnecessary and can hurt performance because the HDD is slower.
However, if you have a very small SSD (e.g., 120 GB) and a large pagefile, it can consume valuable space. In that case, moving it to a secondary drive or reducing its size is reasonable.
Alternatives to Changing the Pagefile
Before tweaking the pagefile, consider these alternatives:
- Add more RAM: The best solution for memory pressure. More RAM reduces reliance on the pagefile.
- Close unused programs: Frees RAM without any system changes.
- Use ReadyBoost: On systems with HDDs, a USB drive can act as a cache, but this is less effective than adding RAM.
- Adjust for best performance: In Performance Options, select “Adjust for best performance” to disable visual effects, freeing some memory.
If you have enough RAM and never see high usage, you can set a small pagefile (e.g., 1024 MB) to satisfy Windows requirements, but don’t disable it completely—some games and software expect it.
Frequently Asked Questions
Should I disable the pagefile if I have lots of RAM?
No. Even with 32 GB or more, some applications and Windows components expect a pagefile to exist. Disabling it can cause crashes in memory-intensive programs and prevent crash dumps. It’s safer to keep a small one (e.g., 1024 MB) or let Windows manage it.
What is the best pagefile size for 16 GB RAM?
For 16 GB, a common setting is 16384 MB initial and 32768 MB maximum, but this is generous. Many users find that System managed works fine. If you want a fixed size, start with 8192 MB initial and 16384 MB maximum and adjust based on usage.
Can I move the pagefile to another drive?
Yes. In Virtual Memory settings, select the new drive, choose Custom size or System managed, click Set, then select the old drive and choose No paging file. Restart to apply. This can help if your C: drive is low on space.
Why does Windows keep changing my pagefile size?
If “Automatically manage paging file size for all drives” is checked, Windows adjusts the size dynamically based on system load. To set a fixed size, uncheck that option and use Custom size.
How do I check the current pagefile size?
Open Task Manager (Ctrl+Shift+Esc), go to the Performance tab, and click on Memory. The pagefile usage is shown at the bottom. For more detail, use the System Properties dialog as described above.
What happens if I set the pagefile too small?
You may see “low memory” errors, and programs may crash when RAM is exhausted. Windows might also fail to create crash dumps. Set it to at least 1024 MB on the boot drive to avoid these issues.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.