Virtual Memory | Page File

The Windows page file (pagefile.sys) is a critical component of the operating system’s memory management system, acting as virtual memory to supplement physical RAM.

What Is the Page File?

The page file is a hidden system file (typically C:\pagefile.sys) that serves as an extension of physical RAM. When RAM becomes full, Windows moves less frequently used data to this file, freeing up space for active processes. Key functions include:

  • Expanding usable memory: Allows systems to run more applications than physical RAM alone could support.
  • Crash dumps: Required to generate system crash logs (e.g., BSOD diagnostics).
  • Application compatibility: Some programs (e.g., database servers, virtual machines) rely on the page file for stability.

    Key Windows Memory Terms

    picture of settings

    In Use: The total physical memory actively used by all running processes, including the operating system, drivers, and applications.

    Committed: The total amount of virtual memory that all processes have reserved, which includes both RAM and page file usage. It represents the maximum potential memory demand.

    Paged Pool: The portion of physical memory used by the kernel for objects that can be written to disk (paged) when not needed in RAM.

    Non-paged Pool: The portion of physical memory used by the kernel for objects that must always remain in RAM and cannot be written to disk.

    Cached: Memory containing data or code that has been fetched into RAM and is not currently in use. This includes Standby and Modified memory, which can be quickly repurposed if needed.

    Available: The amount of physical memory that is immediately available for use by new or existing processes, including both Free and Standby memory.

    Hardware Reserved: Memory set aside by hardware components (such as BIOS or graphics cards) that is not available to Windows or applications.

    Pros and Cons of Disabling the Page File

    Pros of Disabling

  • Frees disk space: Reclaims 2–32+ GB of storage.
  • Avoids disk latency: Eliminates slowdowns from paging if RAM is never exceeded.

    Cons of Disabling

  • System instability: Risk of crashes or "Out of Memory" errors when RAM fills.
  • Broken applications: Certain software (e.g., Adobe apps, Hyper-V) may fail to run.
  • No crash dumps: Disables critical diagnostics for troubleshooting system failures.
  • Disabled memory features: Windows memory compression and ballooning in virtualized environments may malfunction.

    Windows-Managed vs. Manual Configuration

    Letting Windows Manage It

    Pros

  • Automatic optimization: Dynamically adjusts size based on workload.
  • Guaranteed stability: Prevents application compatibility issues.
  • Supports diagnostics: Ensures crash dumps are always available.

    Cons

  • Over-allocation: May reserve excessive disk space, especially on large drives.
  • Fragmentation risks: Frequent resizing can fragment the file on HDDs, slowing access.

    VS. Manual Configuration

    When to Use

  • High-RAM systems: Systems with 32+ GB RAM may benefit from a fixed 4–8 GB page file to ensure crash dump support.
  • Specific workloads: Applications like video editing or virtual machines with predictable memory demands.
  • SSD optimization: Fixed sizes reduce fragmentation and wear on SSDs.
  • Troubleshooting: Resolving "pagefile.sys too large" warnings or storage constraints.

    How to Change This setting

  • Use the windows shortcut windows key + r to open Run
  • Paste this SystemPropertiesAdvanced and enter
  • Under "Performance" click 'Settings' then go to the Advanced Tab where you should see the option to change 'Virtual Memory'

    Terminology to know when setting a manual page file

    picture of settings

  • Initial Size (Minimum Size): This is the amount of disk space (in MB) that Windows will allocate for the page file at system startup. The page file will not shrink below this value during operation and will always be reserved on disk.
  • Maximum Size: This is the largest size (in MB) the page file is allowed to grow to if the system needs more virtual memory.

    Recommended to typically to set these both to the same value

    Recommended Sizes When Choosing Manual

    RAM InstalledManual Page File Size
    ≤ 8 GB1.5x–3x RAM
    8–32 GB1x–1.5x RAM
    ≥ 32 GB4–8 GB fixed

    Risks of an Oversized Page File

  • Storage bloat: Consumes disk space unnecessarily, limiting room for files/apps.
  • Performance degradation: Heavy paging to slow HDDs causes noticeable lag.
  • Fragmentation: Large files on HDDs fragment over time, slowing access speeds.

    What Should You Use?

    Windows-managed: should be ideal for most users, ensuring stability and compatibility. Only set to a manual value if your system can benefit from more than what is currently allotted.

    Benchmarks: W11 23h2 on a 32gb DDR4 System

    Driver latencies were captured with the Windows Performance Toolkit and recorded in microseconds 5 minutes post boot. 4864mb was the default system managed applied setting for me and I paired it off against 32gb equal to 32768mb along with testing no page file.

    Module4864 Max4864 Avg32768 Max32768 AvgNo Page File MaxNo Page File Avg
    ntoskrnl.exe141.10017.094156.20018.739174.90020.335
    storport.sys51.4005.86742.3005.85052.6005.939
    stornvme.sys17.0001.0906.6001.0036.9001.125
    CLASSPNP.SYS9.6001.0578.0001.00964.7003.190
    Ntfs.sys9.1001.0777.5001.0036.7006.437
    • ntoskrnl.exe (Windows kernel)
    • storport.sys (storage port driver)
    • stornvme.sys (NVMe storage driver)
    • classpnp.sys (storage class driver)
    • ntfs.sys (filesystem driver)

    Conclusion: Most storage related drivers showed improved maximum and average latency with a larger page file for my system configuration. Having no page file increased driver latencies on many occasions. It's safe to conclude that you should not disable your pagefile

    FPS was captured with capframex using a repeatable test in Fortnite

    picture of fps

    I would have to say it all seems like it's in the margin of error between the 4 and 32gb options, but when it comes down to comparing them with no page file we did see a tank to the fps. The only time I personally believe you might run into major performance differences with different page file sizes is when you're actively reaching your max ram usage. Outside of that, just don't have no page file and you'll be fine

    Sources for documentation:

    End of Article, feel free to reach out to me if you notice any errors or typos and I will gladly adjust. <3 Khorvie
  • Written on June 16, 2025