Pagefile.sys in Windows 11: Why It Uses Space and Why PC Cleaners Shouldn’t Delete It

Last reviewed: November 23, 2026. The pagefile sys Windows 11 facts and steps were compared with Microsoft documentation and were not run on a real PC.
Quick answer
The short version
- What it is: pagefile.sys is the Windows paging file, also called virtual memory. Microsoft describes it as an optional, hidden system file on a hard disk.
- Why it uses space: Windows moves rarely used memory pages to disk, and the file holds them there.
- Why it matters with lots of RAM: it can back crash dumps, and it sets part of the system commit limit.
- Why not to delete it: Windows keeps it open while it runs. Forcing a delete can cause memory errors, freezing or missing crash records.
- What to do: leave Automatically manage paging file size ticked. Change it only for a clear reason, using a dedicated guide.
In this guide
- What the pagefile sys Windows 11 file does
- Pagefile, swapfile and hiberfil compared
- How to see the file and its size
- Why the size changes
- Why it uses disk space
- Why it still matters with plenty of RAM
- Why PC cleaners should not delete it
- When changing it can make sense
- When it seems too big
- Windows 10 differences
- Checklist before you change anything
- FAQ
- How we checked this
- Sources
What the pagefile sys Windows 11 file does
Windows runs programs and keeps their data in memory, which is RAM. RAM is fast, but it is limited. When it fills up, Windows needs somewhere to put data it is not using right now.
That place is the paging file, named pagefile.sys. People also call it the page file, the paging file or virtual memory.
Microsoft describes a page file as an optional, hidden system file on a hard disk. It lets Windows move infrequently accessed memory pages out of RAM. RAM then serves the data you use most.
The paging file in plain terms
Think of the page file as overflow space. It is not extra RAM. A disk is slower than memory, so Windows uses the file only for data it can wait for.
Windows manages the file by default. Most people never open it. The PC keeps running without any attention to it.
Where it lives
Page files are usually stored in the root of a partition. On most PCs, that partition is the system drive, C:. The file usually sits at C:\pagefile.sys.
The file is hidden and protected. File Explorer does not show it by default. You must show hidden items and stop hiding protected system files to see it. That is general Windows advice, not a Microsoft page.
Its neighbours on C: are swapfile.sys and hiberfil.sys. They sit in the same root folder.
Pagefile, swapfile and hiberfil compared
Three large system files often appear together on C:. They do different jobs. Only one of them is the paging file.
| File | What it does | Size behaviour | Remove by hand? |
|---|---|---|---|
| pagefile.sys | Virtual memory. Holds memory pages that Windows moves out of RAM, and can back a crash dump. | Managed by Windows. Can grow when committed memory demand rises. | No. Windows keeps it open while it runs. |
| swapfile.sys | Used for memory paging by some modern apps, according to Microsoft Community answers. | Managed by Windows. You have no direct size setting. | No. Treat it the same as pagefile.sys. |
| hiberfil.sys | Stores the memory image for hibernation. Hybrid sleep also uses it. | Approximately equal to installed RAM, according to Microsoft. | Only by turning hibernation off. That also stops hybrid sleep. |
This table is a summary. Microsoft documents the page file and the hibernation file in detail. The swapfile.sys point comes from Microsoft Community answers, so we keep that claim short.
How to see the file and its size
You can check the current setting without changing anything. Viewing is safe. The steps below only read values.
Read the current setting safely
Use Settings to view the virtual memory box. Menu names can vary slightly between Windows builds.
SettingsSystemAboutAdvanced system settingsAdvancedPerformance SettingsAdvancedVirtual memory
- Open the box Follow the path above and select Change under Virtual memory. Make no edits.
- Read the first line Find Automatically manage paging file size for all drives. On most PCs it is ticked.
- Read the drive list Each drive shows a size, or No paging file.
- Leave with Cancel Choose Cancel so nothing changes.
You should see the Automatically manage box ticked, and the system drive listed as System managed size.
Note
Unticking the box and selecting OK can change the file. Use Cancel to leave the box without changes.
If this does not work: the box may be greyed out. That usually happens when you are not signed in as an administrator, or when a work policy controls it. Ask whoever manages the PC.
Check the size from PowerShell
To see the size in megabytes, run a read-only command in Windows PowerShell. It changes nothing.
Get-CimInstance Win32_PageFileUsage | Select-Object Name, AllocatedBaseSize, CurrentUsage, PeakUsage
AllocatedBaseSize is the allocated size in MB. CurrentUsage shows how much is in use now. PeakUsage shows the highest use since the last restart. This description of the output is general advice.
You should see one line for each page file, with its path and sizes in MB. A large AllocatedBaseSize is not a fault by itself.
If this does not work: if no line appears, the PC may have no page file, or PowerShell may lack rights to read it. Use the Settings path above instead.
Why the size changes
Most PCs use a system-managed page file. Windows chooses the size, and the size can change.
Microsoft says a system-managed page file grows when the commit charge reaches 90 percent of the commit limit. It can grow to three times physical memory or 4 GB, whichever is larger. It is capped at one-eighth of the volume size, and growth assumes enough free disk space.
Growth is a response to demand. When programs ask for more committed memory than RAM can cover, the file can grow. The Microsoft text we read describes growth, not shrinking. Do not expect the file to drop back on demand.
The crash dump setting also affects the size. Microsoft says system-managed page files are sized to the crash dump settings during startup, if enough disk space exists.
Why it uses disk space
Windows writes memory pages to the page file when RAM is needed for active work. That data has to live somewhere on disk, so the file takes space.
Three things set the total:
- The memory your programs have committed, measured against RAM plus all page files.
- The crash dump setting, which has minimum sizes that Microsoft lists.
- Free space on the drive, because growth needs room to happen.
A small SSD feels this first. When C: has little free space, the file has less room to grow. Check the drive before you blame the page file. Our guide on why the C: drive keeps filling up shows how to measure it.
For a full drive right now, the C: drive full guide lists what to check first. The wider System and reserved category is covered in our System and reserved storage guide.
Why it still matters with plenty of RAM
Many people with 16 GB or 32 GB of RAM ask why the file is needed at all. Microsoft says the reason to keep a page file has not changed.
Microsoft says that with a lot of RAM, a page file might not be needed to support the commit charge at peak use. It may still be needed for crash dumps.
The commit limit
Microsoft defines the system commit limit as physical memory plus all page files combined. It is the most committed memory the system can support.
If the commit charge reaches that limit, the system and processes might not get committed memory. Microsoft says this can cause freezing, crashing and other malfunctions. A page file raises the limit, so removing it lowers the limit.
Crash dumps
A page file can back a system crash dump. Microsoft lists minimum sizes for each dump type. A complete memory dump needs a paging file that holds all physical RAM plus 257 MB. A small memory dump needs a paging file of at least 2 MB on the boot volume, according to Microsoft's memory dump options page.
Without a suitable file, Windows may not write the dump. You then lose the record that helps find the cause of a crash. For how dump files work, read our guide to crash dump files and error reports. If the crash names memory, see the MEMORY_MANAGEMENT blue screen guide.
Why PC cleaners should not delete it
Some cleaner tools list pagefile.sys as junk or as wasted space. Do not accept that label. The file is part of how Windows manages memory. To judge any cleaner before you let it touch system files, use the checklist in our guide Is PC cleaner software safe for Windows 11?.
Registry cleaners and disk cleaners are different tools. For that split, read PC cleaner vs registry cleaner. For the general job a cleaner does, see our overview of PC cleaners.
What a forced delete can do
Windows keeps the paging file in use while the device runs, which is why you cannot delete it normally. A manual delete should be blocked. A tool that forces the delete can cause these problems:
- A lower commit limit, so peak workloads reach the limit sooner.
- Freezing or crashes when programs cannot get committed memory.
- No crash dump after a blue screen, or a dump that is cut short.
For what a cleaner can and cannot do about freezing, read whether a PC cleaner can fix freezing and crashes.
The shutdown clearing policy
Microsoft documents a security policy named Shutdown: Clear virtual memory pagefile. It is disabled by default on client PCs. When it is enabled, Windows clears the page file at shutdown, and that can make shutdown much slower.
It is a security policy setting for special cases, not a clean-up step. We do not walk through changing it. Do not treat it as a way to free disk space or speed up the PC.
PC optimization and cleaner claims
Some PC optimization tools say they can clean, optimize or speed up the page file. Be cautious. Microsoft describes the page file as something to size for your workload and crash dumps. It does not describe it as clutter.
Before you trust a tool’s page file change, ask three questions.
- What exactly changes? The tool should name the setting and the new value.
- Does it promise speed? Treat speed promises with caution, and ask how they were measured.
- Can you undo it? Write down the current values before any change.
For a wider look at these tools, read our guide to PC optimization software. If a tool has already changed your PC and nothing improved, what to check when a cleaner did not help gives the next steps.
When changing it can make sense
Changing the page file is an advanced decision. Most PCs should leave it alone. Consider a change only for a clear reason, such as:
- A small SSD where the system drive is nearly full and the page file is a large share of what is used. Freeing other space may come first, using the Disk Cleanup walkthrough.
- A specific out-of-memory message that a guide ties to the page file, after you have confirmed the cause.
- A heavy workload you have measured, where the commit limit is clearly too low.
Do not turn the page file off as a space fix. That lowers the commit limit and removes crash dump backing. The steps for changing the setting are in our guide to increasing virtual memory. Read that guide in full before you touch the setting. Change one value at a time, restart, and check the result.
Warning
Do not disable the page file on a PC you use every day. Microsoft ties the file to the commit limit and to crash dumps. Disabling it can cause crashes and lose the dump record.
When it seems too big
A large pagefile.sys is not proof of a fault. The file can be large on a PC that works well. Look for the cause before you change anything.
Find what is using memory
- Open Task Manager Press Ctrl + Shift + Esc, then select Performance and Memory.
- Sort by memory On the Processes tab, select the Memory column to see the largest users first.
- Watch Committed Note the value and the limit, then compare them during normal work.
You should see one or two programs near the top of the list. If Committed stays close to its limit during normal work, the workload needs more RAM or fewer open programs.
If this does not work: if nothing stands out and memory is high with nothing open, read why memory stays high with nothing open. For a wider list of causes, see our Windows 11 high memory usage guide.
Check for a program fault first
A page file that is large because one program keeps growing points to that program. Update, fix or remove it. If the PC is slow for other reasons too, the Windows 11 speed-up guide lists the wider checks.
Windows 10 differences
The page file works the same way in Windows 10. The page file works the same way in Windows 10 and Windows 11, as far as the Microsoft pages we read describe it. Menu names can differ between the two.
On Windows 10, open System from the Start menu, then Advanced system settings. The Performance and Virtual memory boxes follow the same pattern. Menu names can vary by build.
Windows 10 also has swapfile.sys. A Microsoft Community answer describes it as system-managed, so treat it the same way.
If this does not work: if your menu looks different, search Settings for Advanced system settings and use the same boxes.
Checklist before you change anything
- Note the current setting Record whether Automatically manage is ticked, and the drive list.
- Check memory first Use Task Manager and the Committed numbers.
- Check free space on the system drive before you judge the file size.
- Skip any tool that calls pagefile.sys junk.
- Keep crash dumps in mind before any change to the file.
FAQ
About the file
Is pagefile.sys a virus?
No. Microsoft describes it as a hidden system file that Windows uses. If a file looks suspicious, run a malware scan, but the paging file itself is normal.
Why is pagefile.sys so large on my C drive?
Most PCs use a system-managed size. Windows grows the file when committed memory nears the limit, within Microsoft’s caps. Check the size and memory use before you act.
Is swapfile.sys the same file?
No. It is a separate file. Microsoft Community answers say some modern apps use it, and Windows manages it. You do not control its size directly.
Should I keep the page file with 32 GB of RAM?
Yes, unless a specific guide tells you otherwise. Microsoft says a page file might not be needed for the commit charge with lots of RAM, but it may still be needed for crash dumps.
Changing or removing it
Can I delete pagefile.sys to free space?
No. Windows keeps the file open while it runs. Forcing a delete can lower the commit limit and remove crash dump support.
Do PC cleaners need to clean the page file?
No. Windows manages it. Judge any tool claim with the three questions in this guide.
Does clearing the page file at shutdown help?
Microsoft documents a policy named Shutdown: Clear virtual memory pagefile. It is disabled by default on client PCs. When enabled, it can make shutdown much slower. This is general advice, not a cleanup step.
Will turning the page file off make my PC faster?
We make no speed promise. Turning it off lowers the commit limit and removes crash dump backing, so it is not a safe speed step.
More help
For more step-by-step repair guides, visit the PC repair guides home page. To find the right article for a symptom, try the Repair Assistant.
How we checked this
We compared each fact with Microsoft documentation. We read the text of the page file, page file sizing, memory dump and hibernation pages, and the shutdown policy page. Where Microsoft says nothing, we label the point as general advice. The swapfile.sys point comes from Microsoft Community answers. No step was run on a real PC, and no third-party product was evaluated.
Sources
- Introduction to the page file - Windows Client | Microsoft Learn
- How to determine the appropriate page file size for 64-bit versions of Windows - Microsoft Learn
- Virtual memory in 32-bit version of Windows - Microsoft Learn
- Memory dump file options - Windows Server | Microsoft Learn
- Varieties of Kernel-Mode Dump Files - Microsoft Learn
- How to disable and re-enable hibernation - Windows Client | Microsoft Learn
- Shutdown: Clear virtual memory pagefile - Microsoft Learn
- Windows shuts down slowly when it is set to clear the virtual memory pagefile - Microsoft Learn
- Swapfile.sys - Microsoft Q&A