How to Change Pagefile Size in Windows 11: A Step-by-Step Guide

In this how-to-change-pagefile-size-in-windows-11-a-step-by-step-guide, we’ll walk through everything you need to know to check, change, move, and troubleshoot the pagefile (virtual memory) on Windows 11 — in plain English, with clear steps, safety tips, and examples. Whether you’re freeing up space, optimizing performance, or moving the pagefile to a faster drive, we’ve got you covered.


Key takeaways — quick summary

  • The pagefile (pagefile.sys) is Windows’ virtual memory file that supplements RAM.

  • You can change the pagefile size via System Properties, PowerShell/WMIC, or the Registry.

  • Recommended practice: let Windows manage pagefile size unless you have a reason to customize.

  • Moving the pagefile to a different drive can help performance (especially from HDD → SSD).

  • Always back up important data and create a restore point before editing registry or system settings.

What is the pagefile (virtual memory) and why does it matter?

The pagefile (pagefile.sys) is a file on your disk that Windows uses like extra RAM. When your physical RAM fills up, Windows moves less-used data from RAM into the pagefile so active processes keep running. Think of RAM as your desk and the pagefile as a filing cabinet — the desk is fast, the cabinet is slower but provides extra storage for work you’re not actively using.


Pagefile vs RAM vs swap — what’s the difference?

  • RAM (Random Access Memory): fast, physical memory used by apps right now.

  • Pagefile (Windows virtual memory): an on-disk extension of RAM used when physical RAM is low.

  • Swap (Linux): the Linux equivalent to Windows’ pagefile.
    The key: pagefile is slower (disk access) but prevents crashes when RAM runs out.


When should you change the pagefile size?

You may want to change pagefile size if:

  • You consistently see high memory usage and want a larger limit to avoid out-of-memory errors.

  • You run memory-heavy apps (video editing, large databases, VMs).

  • You want to move it off a congested drive to improve system responsiveness.

  • You’re on low-disk-space and want a smaller pagefile (careful — may cause crashes).

But: for most users, letting Windows manage pagefile size is recommended.


Recommended pagefile sizes and formulas

Here are common recommendation formulas. Use them as starting points, not hard rules.

Scenario Formula (Initial) Formula (Maximum) Notes
Typical desktop with 8–16 GB RAM 1× RAM 1.5–2× RAM Good balance for general use
Heavy workloads / video editing 1× RAM 2–3× RAM Prevents out-of-memory errors
Small SSD / low disk space 0.5× RAM 1× RAM Be cautious; risk of OOM
Systems with >=64 GB RAM 0.25–0.5× RAM 0.5–1× RAM Pagefile can be smaller; Windows handles it well

Example: If you have 16 GB RAM, you might set Initial = 16,384 MB and Maximum = 32,768 MB (16 GB and 32 GB).


Precautions and backups — before we start

  1. Create a restore point (Settings → System → About → System protection).

  2. Back up important files — editing registry or system settings can have consequences.

  3. Write down current settings so you can revert.

  4. If you have BitLocker or disk encryption, confirm how moving the pagefile interacts with it (usually safe, but know your environment).


How do I check current pagefile settings?

Want to see current settings quickly? Here are three ways.

A. Via System Information (GUI)

  1. Open Start → type System Information → open it.

  2. Look under System Summary → find Total Physical Memory and other memory info. (Pagefile path not shown here.)

B. Via System Properties (to see management mode)

  1. Right-click Start → choose System → on the right click About → click Advanced system settings.

  2. Under Performance, click SettingsAdvancedVirtual memoryChange.

  3. You’ll see whether Automatically manage paging file size for all drives is checked and current values per drive.

C. Using PowerShell (quick and precise)

Open PowerShell (run as admin) and run:

Get-CimInstance -ClassName Win32_PageFileUsage | Format-Table *

This lists allocation and current usage. For settings:

Get-CimInstance -ClassName Win32_PageFileSetting | Format-Table *

How to change pagefile size in Windows 11 — Method 1: System Properties (GUI)

This is the safest and most common method — perfect for beginners.

Step-by-step (numbered)

  1. Press Win + R, type sysdm.cpl, and press Enter — this opens System Properties.

  2. Click the Advanced tab.

  3. Under Performance, click Settings.

  4. In the Performance Options window, click Advanced.

  5. Under Virtual memory, click Change.

  6. If Automatically manage paging file size for all drives is checked, uncheck it to set custom values.

  7. Select the drive where pagefile currently resides (C: usually).

  8. Choose Custom size and enter values (Initial size MB and Maximum size MB). Use numbers from the recommended table.

  9. Click Set, then OK on all dialogs.

  10. Restart Windows if prompted.

Notes & tips

  • Always click Set after entering numbers, otherwise changes won’t apply.

  • If you have multiple drives, you can create/manipulate pagefile on each. See the “multiple drives” section.


How to change pagefile size using PowerShell / WMIC (advanced)

For power users who like scripts.

Check current settings:

# Show current usage
Get-CimInstance -ClassName Win32_PageFileUsage | Format-Table Name, AllocatedBaseSize, CurrentUsage, PeakUsage
# Show pagefile settings
Get-CimInstance -ClassName Win32_PageFileSetting | Format-Table Name, InitialSize, MaximumSize

Set pagefile using WMIC (deprecated but available)

Open an elevated Command Prompt (Admin) and run:

wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=16384,MaximumSize=32768

Replace the path and sizes (in MB) to suit your system. Then reboot.

Remove custom pagefile and let Windows manage it:

wmic pagefileset where name="C:\\pagefile.sys" delete

Then enable automatic management via GUI or by setting new WMIC entries.

⚠️ Note: WMIC is deprecated on modern Windows but still often works. Use PowerShell with CIM for a future-proof approach.


How to change pagefile size via the Registry (advanced, risky)

This method is for experienced users. Back up the registry before making changes.

Registry path

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles

The PagingFiles value lists entries like:

C:\pagefile.sys 16384 32768
D:\pagefile.sys 8192 16384

Steps

  1. Press Win + R, type regedit, Enter.

  2. Navigate to the key above.

  3. Double-click PagingFiles and modify the string values as needed (drive path, initial size, maximum size in MB).

  4. Click OK, close Registry Editor, and restart.

Warning: Mistakes in the registry can make the system unbootable. Only use this method if you know what you’re doing.


How to move the pagefile to another drive (SSD, HDD, NVMe)

Moving the pagefile can be beneficial if you want to relieve a slow or full system drive.

Why move it?

  • Put the pagefile on a faster drive (NVMe/SSD) for better paging performance.

  • Move it off an SSD if you’re worried about wear (modern SSDs are durable; this is rarely needed).

  • Free space on a small C: drive.

Steps (GUI)

  1. Open System PropertiesPerformance OptionsAdvancedVirtual memoryChange.

  2. Uncheck Automatically manage.

  3. On C: select No paging file and click Set.

  4. Select D: (target drive) choose System managed size or Custom size and click Set.

  5. Reboot.

Tip: For best performance, keep one pagefile on the fastest drive and disable it elsewhere, unless you have special needs.


Managing pagefile for multiple drives

If you have several drives:

  • Place the pagefile on the fastest, largest drive (NVMe > SSD > HDD).

  • If two drives are used during heavy paging, Windows may stripe access, but typical benefit is from a single fast drive.

  • You can set small pagefiles on secondary drives for fallback, but it’s usually unnecessary.


Common errors and how to fix them

1. “The system cannot find the file specified” when changing pagefile

  • Cause: Incorrect path or drive letter.

  • Fix: Ensure the drive exists and you have access, or choose a different drive.

2. Pagefile size didn’t change after reboot

  • Cause: You didn’t click Set, or permissions issues.

  • Fix: Re-run as administrator, re-enter values, click Set, then restart.

3. Low disk space error when applying large sizes

  • Cause: Not enough free space on the drive.

  • Fix: Free space or choose a smaller pagefile or different drive.

4. “Access is denied” editing registry/WMIC

  • Cause: Not running as admin.

  • Fix: Run regedit / PowerShell as Administrator.


Best practices for SSDs and modern systems

  • SSDs are fine for pagefile: Modern SSDs handle paging well; performance improves when the pagefile is on SSD vs HDD.

  • Don’t worry about SSD wear: Today’s NAND endurance is typically more than sufficient for normal paging.

  • Let Windows manage unless you need specific sizes for apps, debugging (crash dump requirements), or disk space constraints.


How to verify and monitor pagefile changes

Use Task Manager

  1. Open Task ManagerPerformanceMemory.

  2. You’ll see Committed, In use, and Cached values; it gives insight into when paging occurs.

PowerShell

Get-CimInstance -ClassName Win32_PageFileUsage | Format-Table Name, AllocatedBaseSize, CurrentUsage, PeakUsage

Event Viewer

  • Look at Windows Logs → System for events related to virtual memory or out-of-memory errors.


How to revert your changes safely

  1. Go back to Virtual memory settings (System Properties → Performance → Advanced → Virtual memory → Change).

  2. Re-check Automatically manage paging file size for all drives to return to default.

  3. Or restore the original custom values you wrote down before changing.

  4. If you edited registry, restore from registry backup or System Restore point.


Example scenarios — quick recipes

Scenario: You run VMs and need a larger pagefile

  • Set Initial = RAM size, Maximum = 2–3× RAM. Place on fast NVMe drive. Reboot.

Scenario: You have a small C: SSD and need space

  • Move pagefile to D: HDD (if performance not critical) or reduce to 0.5× RAM (risky). Consider adding physical RAM instead.

Scenario: You want crash dumps for debugging

  • To enable full memory dumps, ensure pagefile max size >= RAM + 1 MB and is on the system drive (usually C:). Windows writes dumps to %SystemRoot%\Memory.dmp.


Conclusion — what we did and next steps

We covered what the pagefile is, why it matters, safe recommendations for sizing, and how to change pagefile size in Windows 11 using GUI, PowerShell/WMIC, and Registry methods. We discussed moving the pagefile between drives, monitoring usage, common errors, and best practices for SSDs.

Next steps:

  • If you’re unsure: leave Windows to automatically manage the pagefile.

  • If you have specific needs (VMs, editing, crash dumps), pick a method above and test it.

  • Always create a restore point before advanced changes.


FAQs — quick answers

1. Should I disable the pagefile on Windows 11?
No — disabling it may cause apps to crash when RAM is exhausted. Keep a pagefile unless you have a specific, well-tested reason.

2. Can I move the pagefile to an external USB drive?
Not recommended. External drives can be disconnected and are typically slower; moving pagefile to them may cause instability.

3. Does pagefile size affect SSD lifespan?
Modern SSDs are durable; normal paging won’t meaningfully reduce lifespan. Keep pagefile on SSD for best performance.

4. How big should pagefile be for 32 GB RAM?
A reasonable starting point: Initial = 8–16 GB, Maximum = 32–48 GB. Adjust based on usage.

5. Will changing the pagefile improve game performance?
If paging is the bottleneck, moving the pagefile to a faster drive can help. But adding RAM often yields better and more consistent gains.

Scroll to Top