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:
Key Windows Memory Terms
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
Cons of Disabling
Windows-Managed vs. Manual Configuration
Letting Windows Manage It
Pros
Cons
VS. Manual Configuration
When to Use
How to Change This setting
Terminology to know when setting a manual page file
Recommended to typically to set these both to the same value
Recommended Sizes When Choosing Manual
RAM Installed | Manual Page File Size |
---|---|
≤ 8 GB | 1.5x–3x RAM |
8–32 GB | 1x–1.5x RAM |
≥ 32 GB | 4–8 GB fixed |
Risks of an Oversized Page File
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.
Module | 4864 Max | 4864 Avg | 32768 Max | 32768 Avg | No Page File Max | No Page File Avg |
---|---|---|---|---|---|---|
ntoskrnl.exe | 141.100 | 17.094 | 156.200 | 18.739 | 174.900 | 20.335 |
storport.sys | 51.400 | 5.867 | 42.300 | 5.850 | 52.600 | 5.939 |
stornvme.sys | 17.000 | 1.090 | 6.600 | 1.003 | 6.900 | 1.125 |
CLASSPNP.SYS | 9.600 | 1.057 | 8.000 | 1.009 | 64.700 | 3.190 |
Ntfs.sys | 9.100 | 1.077 | 7.500 | 1.003 | 6.700 | 6.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
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:
- Microsoft: How to determine the appropriate page file size for 64-bit versions of Windows
- Microsoft: Introduction to the page file
- Microsoft Forums: Physical and virtual memory in Windows 10 (Microsoft Answers)