Pagefile.sys is virtual memory that your computer uses when physical RAM runs out

Pagefile.sys is a hidden file on your hard drive or solid-state drive that Windows uses as overflow storage when your computer's RAM is full. When you open more programs or files than your RAM can hold, Windows moves the least-used data from RAM into pagefile.sys, freeing up space in RAM for active tasks. This keeps your computer running instead of freezing or crashing when memory pressure gets high.

The file is invisible by default — you won't see it in File Explorer unless you turn on the display of hidden system files. Windows creates it automatically during installation and manages it without your input. The size varies depending on how much RAM you have and how much memory your programs demand at any given moment.

Pagefile.sys is not the same as a cache or temporary files folder. It is a dedicated virtual memory system that Windows treats as an extension of your actual RAM, though it runs much slower because it lives on disk rather than in memory chips.

Key Takeaways

  • Pagefile.sys acts as emergency overflow storage when your computer runs out of physical RAM.
  • Windows creates and manages the file automatically; you do not need to set it up or adjust it in most cases.
  • The file is hidden by default and located at the root of your system drive (usually C:\).
  • Using pagefile.sys slows down your computer noticeably because disk access is much slower than RAM access.

How pagefile.sys works when your RAM is full

When you run programs, Windows loads their data into RAM so the processor can access it quickly. RAM is fast but limited — most computers have between 4 and 32 gigabytes. Once RAM fills up, Windows has a choice: stop accepting new tasks, or move some existing data out of the way.

Windows chooses the second option. It identifies data in RAM that has not been used recently and writes it to pagefile.sys on your disk. This frees up RAM space for the program or task you are currently using. If you switch back to the program whose data was moved, Windows reads that data back from pagefile.sys into RAM — a process called a page fault.

This back-and-forth works, but it is slow. Reading from and writing to disk takes milliseconds, while RAM access takes nanoseconds. If your computer is constantly swapping data between RAM and pagefile.sys, you will notice stuttering, lag, and delays in opening files or switching between programs.

Where pagefile.sys lives and how large it grows

Pagefile.sys sits at the root of your system drive, usually C:\. You can see it only if you enable the display of hidden system files in File Explorer's View settings. The file is marked as a system file, so Windows prevents you from moving, deleting, or renaming it directly.

Windows sets a default size based on your RAM. On most modern systems, the initial size is 1.5 times your total RAM, and the maximum size is 3 times your total RAM. For example, a computer with 8 gigabytes of RAM might have a pagefile that starts at 12 gigabytes and can grow to 24 gigabytes. The file expands and shrinks as memory demand changes throughout the day.

You can change the pagefile size manually through System Properties, but Windows handles sizing well on its own. Manually shrinking it too much can cause crashes if your computer needs more virtual memory than the smaller file allows. Manually enlarging it rarely helps performance — if you are running out of virtual memory, the real problem is that you need more physical RAM.

Why your computer slows down when pagefile.sys is in heavy use

Pagefile.sys exists to prevent crashes, not to improve speed. When your computer relies on it heavily, performance drops noticeably. A program running entirely in RAM might complete a task in seconds. The same program, if its data is split between RAM and pagefile.sys, might take 10 or 20 seconds because of the constant disk reads and writes.

Solid-state drives (SSDs) are faster than older hard disk drives (HDDs), so pagefile.sys performs better on an SSD. Even so, SSD access is still much slower than RAM access. If you see your computer slowing down and your disk light is constantly on, pagefile.sys activity is often the cause.

The solution is to add more physical RAM, not to adjust pagefile.sys. More RAM means Windows can keep more data in fast memory and relies less on the slow disk file. If your budget does not allow for a RAM upgrade, closing unnecessary programs and browser tabs will reduce memory pressure and reduce pagefile.sys use.

Pagefile.sys versus hibernation files and other system files

Pagefile.sys is often confused with other system files that also use disk space. Hiberfil.sys is a different file that stores your entire RAM contents when you put your computer into hibernation mode — it is roughly the same size as your total RAM and sits dormant until you wake the computer. Swapfile.sys is a newer file that Windows 10 and later use alongside pagefile.sys for app memory management, particularly for apps from the Microsoft Store.

Temporary files in your Temp folder are also different — they are created by programs and applications, not by Windows' core memory management system. Deleting temp files frees up disk space but does not affect pagefile.sys or system performance in the same way.

All three files (pagefile.sys, hiberfil.sys, and swapfile.sys) are normal and necessary. Deleting any of them will cause problems — Windows will recreate them automatically, or your computer will crash if it tries to use them and they are missing.

Should you disable or delete pagefile.sys

You should not disable pagefile.sys unless you have a specific reason and plenty of RAM. Disabling it means Windows cannot use virtual memory at all. If you run out of physical RAM, programs will crash instead of moving data to disk. This is why computers with very large amounts of RAM (64 gigabytes or more) sometimes disable pagefile.sys — they are unlikely to ever need it.

For typical computers with 8 to 32 gigabytes of RAM, keeping pagefile.sys enabled is the safer choice. The small disk space it uses is worth the protection against out-of-memory crashes. You cannot delete the file directly while Windows is running, and attempting to delete it at startup will cause errors.

If you want to reclaim disk space, look elsewhere first — old Windows updates, duplicate files, or unused programs will free up far more space than shrinking pagefile.sys. If your disk is genuinely full and you need space urgently, you can reduce the pagefile size through System Properties, but this is a temporary fix. The real solution is to add a larger drive or delete files you no longer need.

Frequently Asked Questions

Can I see how much of pagefile.sys is actually being used right now?

Yes, through Task Manager. Open Task Manager, go to the Performance tab, click Memory, and look at the bottom of the window. It shows "Committed" memory, which is the total of RAM plus pagefile.sys currently in use. You can also use Resource Monitor (search for it in Windows) to see pagefile.sys activity in real time, though the numbers update quickly and are hard to read.

Is pagefile.sys a virus or malware?

No. Pagefile.sys is a legitimate Windows system file created and managed by the operating system. Malware sometimes hides inside it or tries to interfere with it, but the file itself is not dangerous. If antivirus software flags pagefile.sys as a threat, the threat is likely something hiding in memory, not the file itself.

Why is my disk full if pagefile.sys is supposed to be small?

Pagefile.sys can grow quite large if your computer is under heavy memory pressure. On a system with 16 gigabytes of RAM, pagefile.sys can reach 24 to 48 gigabytes if you are running many demanding programs. If your disk is full, check the size of pagefile.sys, hiberfil.sys, and your Downloads or Temp folders — one of these is usually the culprit.

Does moving pagefile.sys to a different drive improve performance?

Slightly, if you move it to a faster drive or a drive that is less busy. Moving pagefile.sys from a slow external drive to your internal SSD would help. Moving it from one partition of the same SSD to another partition makes almost no difference. The improvement is small compared to simply adding more RAM.