/
/

How to Reduce or Delete pagefile.sys

by Lauren Ballejos, IT Editorial Expert
UI illustration representing a large pagefile.sys

Key Points

  • Understand What pagefile.sys Is: A hidden Windows system file that acts as virtual memory, supplementing your physical RAM when it runs low.
  • Why It Gets Large: High resource usage, Windows’ automatic size management, and memory leaks from applications that don’t properly release RAM after closing.
  • Reduce pagefile.sys: Navigate to “System Properties” > “Advanced system settings” > “Performance” > “Virtual Memory.”
  • Don’t Delete pagefile.sys: Doing so can cause system crashes when RAM is exhausted and prevents Windows from generating crash dump files after a BSoD.
  • Delete As a Last Resort: Disable the paging file through “Virtual Memory” settings; then reveal hidden system files in File Explorer to locate and remove pagefile.sys.
  • Let Windows Manage It: For most users, setting pagefile.sys to “System managed size” is the safest and most efficient option.

Have you ever noticed a surprisingly large file named pagefile.sys lurking within your computer’s storage? You’re not alone. Many Windows users have been left perplexed about the purpose of pagefile.sys and, more importantly, how to manage it effectively without undermining their system’s performance. This article will help you understand what pagefile.sys is, why pagefile.sys is large, and how you can tame its size safely.

If you prefer watching instead of reading, here’s a video that explains how to reduce or delete pagefile.sys.

What to do about a large pagefile.sys

There are three main strategies you might consider with a large paging file: moving it, reducing its size, or deleting it (carefully).

Move pagefile.sys

Moving pagefile.sys from your system drive (usually the C: drive) to another drive could free up space on your primary drive. This can lead to enhanced performance, especially if the secondary drive has more storage or is faster (such as an SSD). While moving pagefile.sys isn’t a cure-all, it can help redistribute the impact of a large page file across your storage ecosystem.

To move pagefile.sys, follow these steps:

  1. Open “System Properties” by right-clicking “This PC” or “My Computer” on your desktop and selecting “Properties.”
  2. Navigate to “Advanced system settings” and click the “Settings…” button in the “Performance” section.
  3. In the “Performance Options” window, go to the “Advanced” tab and click “Change…” under “Virtual Memory.”
  4. Uncheck “Automatically manage paging file size for all drives.”
  5. Select the system drive with the large pagefile.sys, choose “No paging file,” and then click “Set.”
  6. Choose another drive where you want to move pagefile.sys.
  7. Select “System managed size” or “Custom size” as preferred and click “Set.”
  8. Click “OK” and restart your computer for the changes to take effect.

Note that in Windows 11, the path in the first step is as follows: “Settings” > “System” > “About” > “Advanced system settings.” To make things easier, use the search bar and type “Adjust the appearance and performance of Windows” to jump directly to “Performance Options.”

Reduce the size of pagefile.sys

If transferring pagefile.sys isn’t an option, try experimenting with how much room pagefile.sys uses. Windows typically manages this setting automatically, but controlling it manually may be more efficient.

  1. Access the “Virtual Memory” settings by following steps 1 through 4 in the previous section.
  2. At the hard drive list, select your current system drive.
  3. Select “Custom size” and manually enter a lower value than what’s currently set.
  4. Confirm your actions by clicking “Set” and then “OK.”

Resizing pagefile.sys too much can impede system performance, resulting in system instability. If you want to undo your changes, go back to the “Virtual Memory” settings and select “System managed size,” letting Windows recalibrate the file’s size automatically.

Delete pagefile.sys (don’t)

First, know that pagefile.sys is necessary to your system. It serves as a crucial buffer for when your physical RAM fills up. Without it, Windows will crash rather than chug along when stretched thin in terms of memory, putting your data at risk. That’s why you shouldn’t delete it.

Windows also relies on the paging file to generate crash dump files (minidumps and full memory dumps). Deleting it entirely can prevent Windows from recording diagnostic data after a Blue Screen of Death, making troubleshooting significantly harder.

That said, certain scenarios may require you to delete pagefile.sys. Taking such an action should be restricted to advanced users who have an in-depth command of the operating system. Also, be aware that rebooting your computer will reinstate mandatory files such as pagefile.sys anyway, making it difficult or impossible to delete the paging file permanently.

If you’re absolutely sure you want to delete pagefile.sys, follow these steps to view the file and delete it:

  1. Make sure all open files are closed. It’s best to back up your files before you proceed.
  2. Open “File Explorer” and go to the C: drive.
  3. Click the three-dot menu (…) or the “View” tab in the ribbon and then select “Options.”
  4. Click “Change folder and search options.”
  5. In the window that appears, click the “View” tab and uncheck “Hide protected system operating files.”
  6. Check the radio button next to “Show hidden files, folders, and drives” and click “Apply,” and you’ll be able to see pagefile.sys.
  7. Right-click pagefile.sys and select “Delete.” Depending on the size of your pagefile.sys, it may bypass the Recycle Bin and be deleted immediately.
  8. Restart your computer.

Note that in Windows 11, the path is “View” > “Show” > “Hidden items,” and a separate toggle exists for protected system files via “View” > “Show” > “Protected system files,” so there’s no need to dig into “Folder Options” for basic visibility.

What is pagefile.sys?

In Windows operating systems, pagefile.sys is what’s known as a “page file” or “paging file.” It serves as an extension of your computer’s physical memory or RAM (random access memory).

If you have too many programs open or you’re running a particularly hefty software application, Windows can run out of physical RAM. As a result, the operating system starts using your hard drive or solid-state drive (SSD) as additional virtual memory.

Essentially, pagefile.sys acts as a “spillover tank” to help contain spikes in RAM usage, allowing your system to handle more processes than the physical memory would normally permit. When the RAM gets full, lesser-used data is treated as overflow and moved to pagefile.sys, making room for new information in RAM. While systems with 16GB or more of RAM will trigger page file use less frequently, the paging file remains important for memory spikes, certain enterprise workloads, and crash dump generation.

Using pagefile.sys comes with a major caveat: reading from and writing to a hard disk or SSD is significantly slower than accessing RAM. As such, pagefile.sys can’t completely replace physical memory, but it works well enough as a stopgap measure.

Why is pagefile.sys taking up so much space?

Why is your pagefile.sys huge? There are three main reasons:

  1. High resource usage: Running multiple programs or programs that require large amounts of resources will make the pagefile.sys file larger since more virtual memory is required to support it.
  2. Default settings: Windows automatically manages the size of pagefile.sys and may allocate more space than necessary based on the available disk space and other factors.
  3. Memory leaks: Occasionally, applications don’t correctly release all the memory they use after they close, leading to an unnaturally enlarged pagefile.sys over time.

A bulging pagefile.sys might not always signify trouble; it could simply mean your computer is juggling many tasks at once. However, if you suspect something isn’t right, such as sluggish performance or vast amounts of unused RAM, then it’s a wise idea to consider steps to reduce the size of pagefile.sys.

For further guidance on safeguarding and managing your virtual memory, check out our video “How to Enable or Disable Virtual Memory Page File Encryption.”

Impact of a large pagefile.sys on system performance

When pagefile.sys swells to an excessive size, it may signal underlying issues that could impede your computer’s performance. Below are some ways that an oversized pagefile.sys could impact your workflow:

  • Drive storage consumption: If pagefile.sys continually occupies a large chunk of your storage space, this can restrict how much room you have for other content, such as software installations or personal media.
  • Performance hiccups: When tasks are swapped out from physical memory to the page file, expect delays and system slowdowns. Even the speediest SSDs lag behind modern RAM speeds significantly.
  • Increased wear on drives: On older or lower-endurance SSDs, frequent page file writes can contribute to wear over time, though modern NVMe drives are far more resilient, and this is rarely a practical concern for most users.

What’s more, you may encounter frequent “Out of Memory” warnings despite having plenty of unused disk space tied up in your gigantic pagefile.sys. So what can you do about these issues?

Optimize Your System Performance

Struggling with system performance issues in your organization? Try NinjaOne for free and automate your IT management, ensuring optimal system performance with ease.

Get support for pagefile.sys and more

Navigating the complexities of your computer’s memory, particularly pagefile.sys, demands a great deal of technical know-how. If you need more support for pagefile.sys issues and other IT fundamentals, there are a few places you can turn:

  • Tech forums frequented by IT professionals and enthusiasts (such as the NinjaOne Discord, Microsoft’s official support forum, and Reddit communities)
  • Instructional content in various knowledge bases and technology blogs
  • Remote technical support services that can walk you through solutions step-by-step

Managing pagefile.sys doesn’t have to be difficult, and neither should managing the system itself. NinjaOne is a powerful, flexible, and robust endpoint management software that helps IT departments control and monitor the devices being used within an organization. NinjaOne can do everything from software deployment and patch management to monitoring and alerting, helping you stay on top of all your devices.

FAQs

Microsoft recommends a page file size of 1.5× your total RAM as a starting point, with a maximum of 3× your RAM.

For most users with 16GB of RAM, a custom size between 2,400MB and 48,000MB is a reasonable range. However, letting Windows manage the size automatically is the safest option for most users as it adjusts dynamically based on your system’s actual needs.

An SSD is the better choice for pagefile.sys because its faster read/write speeds reduce the performance penalty when Windows needs to access virtual memory.

If you have both an SSD and an HDD, keep pagefile.sys on the SSD. On NVMe drives specifically, the performance gap between page file access and RAM is smaller than on traditional HDDs, though RAM is still significantly faster.

Yes, it can. While a large pagefile.sys is normal under heavy workloads, a consistently and unusually large file, especially on a system with ample RAM, may indicate a memory leak. This happens when an application fails to release RAM after closing, forcing Windows to push excess data into the page file. If you suspect a memory leak, use Task Manager or Resource Monitor to identify which processes are consuming abnormal amounts of RAM.

Not immediately. Reducing the page file size in virtual memory settings takes effect after a restart, at which point Windows will recreate the file at the new, smaller size. The space freed up depends on how much you reduce it. Keep in mind that setting it too small can cause system instability, so avoid reducing it below Windows’ recommended minimum.

Yes, and in some cases, it can improve performance.

Windows supports having a page file on multiple drives simultaneously. Spreading the page file across a fast secondary drive can reduce the load on your primary drive. However, for most home users, this is unnecessary; it’s more beneficial in server environments or workstations running extremely memory-intensive applications.

Yes—but far less than it used to.

With 32GB of RAM, the vast majority of everyday tasks—including gaming, video editing, and running multiple applications—will rarely push Windows to use the page file at all. That said, it should still be kept enabled because Windows requires it for crash dump generation and to handle rare but sudden memory spikes. Disabling it entirely offers little practical benefit and carries unnecessary risk.

You might also like

Ready to simplify the hardest parts of IT?