What is the pagefile.sys file and should you disable it in Windows 11?

Last update: 13/11/2025

  • Pagefile.sys is Windows virtual memory and provides stability when RAM is full.
  • With plenty of RAM you can reduce or disable paging, but keep an eye on performance and app closures.
  • Adjusting size or cleaning on shutdown offers a balance between space and fluidity.
pagefile.sys

If you use Windows daily, sooner or later you'll come across a file called pagefile.sys occupying a good portion of the C: drive. Although you can't see it at first glance, it's there for a reason: It serves as a backup when RAM runs out.In this article I explain in detail what it is, when it's advisable to keep it, how to reduce its size, move it or disable it, and what happens to other files like hiberfil.sys.

Don't worry if you've never touched this setting before. Windows manages the paging file automatically And in most cases, it's the safest option. However, if you're running low on disk space or notice that the system is sluggish when you open many programs, adjusting pagefile.sys can make a difference, and along with other optimizations to make Windows run faster.

What is pagefile.sys and why does it exist?

Pagefile.sys is the Windows page file, a block of virtual memory that the system uses as an "escape valve" when RAM becomes full. It functions as a complement to physical memoryWhen there is little free RAM, Windows dumps data and parts of applications that do not need to be active at that moment into pagefile.sys.

Imagine you minimize a resource-intensive app and then immediately launch another that demands a lot of memory. In that case, Windows might move part of the minimized application to pagefile.sys to... Free up RAM quickly without closing anythingWhen you return to that app, its data will be read from the page file and returned to RAM.

By default, the file is saved in the root of the drive where the system is located (usually C:\). Reading and writing to pagefile.sys is slower than doing so in RAM.And even more so if your drive is a traditional HDD. With an SSD, the penalty is less noticeable, but it still exists, so ideally you shouldn't rely too heavily on paging.

pagefile.sys

How does it affect performance and what role do HDDs and SSDs play?

When Windows pulls from pagefile.sys, data access becomes slower for technical reasons: The disk (even an SSD) never achieves the latency of RAMWith an HDD, the difference is very noticeable; with an SSD, the performance drop is less, but it's still there. Even so, loading from pagefile.sys is faster than closing and reopening an entire app.

Some guides claim that with SSDs the page file "is no longer useful". That statement is, at the very least, incomplete.Windows continues to benefit from paging for stability and compatibility, especially with applications that rely on the system to have virtual memory available. However, you can reduce paging if you have plenty of RAM.

Exclusive content - Click Here  How to Enable File Extension Display in Windows 11: Complete and Updated Guide

Should I delete pagefile.sys?

It depends on your computer and how you use it. If you have plenty of RAM (16 GB or more for average use, or 32 GB if you work with heavy loads), you can disable the page file and not notice anything in most scenarios. On devices with 8 GB or less, disabling it may cause slowdowns or application closures if you reach the RAM limit.

Some sources recommend never removing it, while others indicate that with sufficient memory you can do without it. The practical reality is that Modifying or even deactivating it is possible and reversibleBut be sensible: if your computer starts to run slowly or become unstable, reactivate it or increase its size.

drive C:

How to view the size of pagefile.sys on drive C:

In order to inspect it, you must first make the protected system files visible. Follow these steps carefully and hide them again when finished:

  1. Open Explorer with Win + E and go to "This PC" > Drive C:. Access Folder Options.
  2. In Windows 11, click on the three dots at the top and choose "Options"; in Windows 10, go to "View" > "Options". It's the same panel in both versions.
  3. On the "View" tab, check "Show hidden files, folders, and drives" and uncheck "Hide protected operating system files." Accept the warning.
  4. Apply the changes and return to C:\: you will see pagefile.sys with its size. Remember to restore the concealment afterwards.

Disable or remove it from the advanced settings

If you decide to do without the file, you can do so from the classic settings. Windows will remove it after restarting. and it will stop using it until you reactivate it:

  1. Press Win + S, type "sysdm.cpl" and press Enter to open System Properties. You can also go to Settings (Win + I) > System > About > Advanced system settings.
  2. On the "Advanced Options" tab, within "Performance", click "Settings". Then go to the "Advanced Options" tab.
  3. In "Virtual memory", click "Change…", uncheck "Automatically manage paging file size for all drives". Select "No paging file" and press "Set".
  4. Accept the warnings, apply them, and restart your PC. Upon startup, Windows will stop using pagefile.sys and will eliminate it if it existed.

Keep in mind that if you disable paging completely and reach the RAM limit, The system may stutter or even close applicationsIf that happens, turn pagination back on or adjust its size.

Change the size of pagefile.sys (manual adjustment recommended)

A more balanced alternative is to set a custom size. This way you control the space it occupies and prevent it from growing without limit.:

  1. Repeat the access to "Virtual Memory" and uncheck the automatic management box. Choose "Custom Size".
  2. Indicate "Initial size (MB)" and "Maximum size (MB)". For example, 4096 and 4096 for a fixed 4 GB or 4096/8192 for 4-8 GB.
  3. Tap "Set", accept and restart to apply. Use values ​​appropriate to your RAM and your usage (with 8 GB of RAM, 4–8 GB of paging usually works well).
Exclusive content - Click Here  How to install Windows 10 on an iPad

Another guideline mentioned is to check the "Currently allocated" and decide from there. If Windows allocates, for example, 10 GB, you can try leaving it at a fixed 5 GB (5000 MB) and see how it goes. There is no magic number.The important thing is to test and verify stability.

Moving pagefile.sys to another drive: pros and cons

It is possible to move the paging file to another drive to free up space on C:. Do this only if the other unit is at least as fast (ideally another SSD):

  • In "Virtual memory", select C:, check "No paging file" and press "Set". Next, choose the new drive..
  • Select "System managed size" or define a "Custom size". Press "Set" and accept. Reboot when finished.

If you move paging from an SSD to an HDD, The drop in performance can be considerable when using virtual memory. If you notice instability or slowness after moving it, put it back on the system drive.

Delete it on every shutdown: Group Policy and Registry

Another option is not to disable paging, but to ask Windows to clean the file on every shutdownThis frees up space before shutting down (or keeps it "clean" for safety), at the cost of the shutdown taking a little longer:

  • Group Policy (Windows Pro/Education/Enterprise): Open "gpedit.msc" (Win + R). Go to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options. Enable "Shutdown: delete virtual memory paging file".
  • Registry (all editions): Open "regedit" and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management. Edit "ClearPageFileAtShutDown" and set it to 1Restart to apply.

Remember that the Home edition does not include the Group Policy Editor. The Registry method works in all editions.But it's advisable to export a backup copy before touching anything.

privazer

Third-party apps: Remove pagefile.sys with PrivaZer

If you prefer an external tool, Private It allows you to delete pagefile.sys using different criteria: after each cleaning, only on the next shutdown or on every shutdownIt is a free utility with a portable version.

It usually includes more system and program trace cleaning functions, which can help you recover gigabytes and Protect your PC from advanced spying. The downside is that it's additional software. (not integrated into Windows) and requires you to run and configure it.

Frequently asked questions about pagefile.sys

  • What happens if I delete pagefile.sys on a computer with low RAM? If you disable paging on a PC with 4–8 GB of RAM, you'll likely experience stuttering when you fill up the memory. Apps may become slow or crash. With 16–32 GB, the impact is usually less significant unless you reach your RAM limit.
  • Can I move pagefile.sys to a USB drive or external hard drive? It's not recommended. External drives are usually much slower and can disconnect, causing errors and terrible performance if the system tries to use virtual memory there.
  • Is it a good idea to delete pagefile.sys and hiberfil.sys at the same time? It's possible, but you need to understand the consequences: without pagefile.sys you'll be 100% dependent on RAM, and without hiberfil.sys there will be no hibernation and Fast Startup may be disabled. Consider first whether you really need that space.
  • How do I know how much space pagefile.sys takes up? Enable "Hidden items" and show "Protected System Files" in File Explorer to see C:\pagefile.sys and its size. Right-click > Properties to see the exact size. Remember to hide it again afterward.
  • If I delete it, will Windows automatically recreate it? If you leave automatic management enabled or define a size in "Virtual memory", Windows will create and use pagefile.sys. If you choose "No paging file", it will not be recreated until you re-enable it.
Exclusive content - Click Here  How to access Gmail

Quick method: Disable, adjust, or clean pagefile.sys (Windows 10/11)

In case you want to have it handy, here's the summarized diagram without missing any details: All paths are valid in both Windows 10 and Windows 11even if the interface changes.

  1. Open System Properties: Win + S > "sysdm.cpl" > Enter, or Settings (Win + I) > System > About > Advanced system settings. Performance > Settings > Advanced options > Virtual memory.
  2. To disable completely: uncheck "Automatically manage…", check "No paging file" > "Set" > OK > Restart. Only recommended with plenty of RAM.
  3. Manual adjustment: "Custom size" with values ​​in MB (e.g., 4096 initial and 8192 maximum). Balance between stability and space.
  4. Clean up on shutdown: Group Policy "Shutdown: Clear the virtual memory page file" or Registry "ClearPageFileAtShutDown=1". Shutdown is a bit slower.

The key is to adapt the configuration to your reality: how much RAM you have, how you use your PC, and how much you value disk space versus stability. With a couple of controlled tests and restarts, you'll know your sweet spot..

Properly managing pagefile.sys and hiberfil.sys allows you to free up space when needed and keep the system running smoothly when memory is tight. If you're unsure, let Windows manage it and find space using built-in tools. (Cleaning up updates, temporary files, apps, and games you don't use). This way, you avoid touching system components that, while adjustable, are there to keep everything running smoothly.

Reliable websites for downloading free virtual machines (and how to import them into VirtualBox/VMware)
Related article:
Reliable websites for downloading free virtual machines (and how to import them into VirtualBox/VMware)