How to modify pagefile.sys in Windows

Last update: 23/05/2025
Author Isaac

pagefile

The Windows operating system , while seemingly simple to the user, hides many elements under the hood that allow programs and games to run efficiently, quickly, and stably. One of these fundamental files, and one that has generated countless questions, is pagefile.sys, better known as the page file . If you want to know what it is, what it's for, and how you can modify it on your PC, here's the most complete and up-to-date guide.

Virtual memory and disk space management is becoming increasingly important, especially now that computers face demanding tasks, large volumes of data, and increasingly sophisticated systems. The pagefile.sys file is key to maintaining your computer's stability and performance, but it can also become a problem if it takes up too much space or isn't properly configured. Therefore, in this article, we'll clear up all your doubts: from its actual purpose to the exact steps for reducing, moving, or even disabling the file, taking advantage of little-known tips and tricks.

 

What is pagefile.sys and what is it used for?

Pagefile.sys is a file that Windows uses to manage virtual memory. When your computer's physical RAM (which typically determines your PC's ability to handle demanding programs or multiple tasks simultaneously) runs out, Windows uses this file on your hard drive or SSD to expand it . Technically, the system instantly copies less frequently used data to pagefile.sys , freeing up RAM for other, more important applications.

This system file, which is usually hidden and protected by Windows, acts as a "secondary RAM," albeit much slower than physical RAM. For example, if you have a game open and decide to open Photoshop, Windows itself might send portions of the game's memory to pagefile.sys while you work with the image editor, and vice versa. This prevents the computer from crashing or closing programs due to insufficient memory.

Virtual memory management is essential to avoid crashes and improve performance.

In practice, this means that even if your computer has 8, 16, or even 32 GB of RAM, if you open too many applications, Windows will use pagefile.sys to prevent memory errors. Accessing virtual memory is slower than accessing RAM, but it's still essential to ensure that resource-intensive programs don't cause crashes, unexpected shutdowns, or data loss.

Where is pagefile.sys located and how do I view it?

Pagefile.sys is usually located in the root directory of the drive where Windows is installed (C:). Because it's a critical system file, it's hidden and protected by default to prevent accidental modifications. However, you can check its size and location by following these steps:

  • Open File Explorer (Windows + E)
  • Access drive C:
  • Click the "View" tab and go to "Options" (in modern versions of Windows it may appear as a three-dot icon)
  • In the pop-up window, switch to the "View" tab.
  • Check the box for "Show hidden files, folders, and drives"
  • Uncheck "Hide protected operating system files (recommended)"
  How to clear Copilot Memory and clean AI in Microsoft, Windows, and GitHub

After accepting the security warning, you will see pagefile.sys along with other system files. It typically occupies several GB, depending on the size allocated by Windows or customized by the user.

Can it be deleted or is it essential?

Is it necessary to always have the page file active? Can I delete it if I need space? While it might be tempting to delete pagefile.sys to gain a few GB, doing so can seriously affect the stability and performance of your computer, especially if you have less than 16 GB of RAM.

Removing it is only recommended in very specific cases, and always knowing that there are clear risks:

  • The system may slow down noticeably when physical RAM is exhausted.
  • Certain applications or games may close abruptly or crash.
  • Windows may not generate dump files for blue screens (critical for diagnosing critical errors).

In general, it's wisest to adjust its size or location rather than remove it. Only on computers with a lot of RAM (over 16 GB and very limited usage) should you consider disabling it.

How to fix “Out of Virtual Memory” error in Windows 11-0
Related articles:
How to fix “Out of Virtual Memory” error in Windows 11

Why does pagefile.sys sometimes take up so much space?

pagefile.sys

Windows tends to automatically allocate a considerable size to the page file to ensure a buffer of virtual memory. This can be problematic on small SSDs or computers with limited storage , as pagefile.sys can reach 8, 16, or more GB, depending on the PC's configuration and usage.

This allocation depends on several factors:

  • Amount of available RAM memory.
  • Custom or automatic virtual memory settings.
  • Frequent use of very demanding applications that exceed the installed RAM.

If you find that pagefile.sys is taking up too much space, you can manually resize it , move it to another drive, or even disable automatic management to optimize space to your actual needs.

How much should pagefile.sys take up based on RAM?

There is no single or universal size, but Microsoft's classic recommendation is between 1 and 1,5 times the total amount of physical RAM installed in the computer. For example:

  • For 4GB RAM: 4-6GB pagefile.sys
  • For 8GB RAM: between 8 and 12GB maximum
  • For 16GB RAM: You can reduce it to 2-4GB if you don't use heavy applications.
  How one can Make Siri Name You By Any Identify

This value can be adjusted according to your needs and how you use the computer. If you work with video editing software, 3D modeling, or play games frequently, it may be advisable to set a larger size. For more modest use, reducing it helps free up disk space.

How to modify, reduce, or move pagefile.sys in Windows step by step

If you need to adjust the page file for space or performance reasons, follow this procedure to modify pagefile.sys correctly :

  1. Open the Control Panel (by searching for it in Windows + S or from the start menu).
  2. Go to “System and Security” and select “System”.
  3. Click on “Advanced system settings” (in the left menu).
  4. In the properties window, select the “Advanced Options” tab.
  5. Click the “Settings” button in the “Performance” section.
  6. In the new window, go back to “Advanced Options.”
  7. Find the area called “Virtual Memory” and press “Change…”.
  8. By default, you'll see the “Automatically manage paging file size for all drives” option enabled. Uncheck it to enable manual controls.
  9. Select the drive where you want to modify or move the file.
  10. Select “Custom size” to manually define the minimum and maximum pagefile.sys values, or if you prefer, you can select “No paging file” (not recommended except in justified cases with a lot of RAM).
  11. Enter the desired values ​​(in MB) and press “Set”.
  12. You can move the file to another partition or disk by selecting the destination drive and repeating these steps.
  13. Click “OK” on all windows and Restart your computer to apply the changes.

Advantages and disadvantages of modifying pagefile.sys

Modifying the paging file can bring substantial improvements, but only if done judiciously:

  • Advantages:
    • Reclaim disk space when allocated virtual memory exceeds actual needs.
    • Improve performance, especially if moved to a less congested secondary drive.
    • Prevent fragmentation by assigning the same value to initial and maximum size.
  • Disadvantages:
    • Reducing the size too much can cause crashes or unexpected closures of heavy applications.
    • Removing it completely may cause the system to be unstable if virtual memory is missing.

If you're unsure of the required size, it's best to let Windows manage pagefile.sys automatically, adjusting its size if it's taking up too much disk space.

Is it better to disable, shrink, or move the paging file?

It depends on your needs and the hardware :

  • Disabling it is only recommended if you have a lot of RAM (more than 16 GB) and never need additional virtual memory.
  • Reducing its size is the most common option If you have little RAM, but without loading the computer with many demanding applications.
  • Moving pagefile.sys to a drive other than your primary drive is recommended if you have a small SSD and another drive with free space. This helps free up space on the main drive and maintain good system stability.
  BitLocker asks for recovery key every time you boot: causes and definitive solution

It's never advisable to leave it at zero if your usage is demanding; allocating the space based on your needs is the best strategy.

What happens when you delete pagefile.sys?

If you decide to disable the paging file, Windows will no longer have that virtual memory buffer. What does this mean?

  • On PCs with a lot of RAM (more than 16 GB and moderate loads), you probably won't notice any changes unless you run very demanding programs.
  • On computers with 4-8 GB of RAM, if you need more virtual memory, the system may generate errors, crashes, or blue screens.
  • Windows itself will warn you of the risks before removing it.
  • The file is not automatically deleted; a reboot is required to apply the changes.

Manually removing it after disabling it in settings requires a reboot for it to take effect and restore system stability.

What should I know when modifying pagefile.sys in Windows 10 and Windows 11?

The method for modifying, reducing, moving, or deleting the page file is virtually the same in Windows 10 and 11. Microsoft maintains the interface, so these steps work for both versions (and also for Windows 7 and 8.1, with minor changes in menu names).

  • Go to the Control Panel, search for "System" and select "Advanced Settings."
  • Go to “Advanced Options” and under “Performance” click “Settings.”
  • Click "Change" in the virtual memory section, uncheck the automatic management option, and adjust the values ​​​​according to your needs.
  • Don't forget to apply the changes and restart for them to take effect.

Moving pagefile.sys to another SSD can extend the life of your primary drive and improve overall performance.