A page file (also known as a "paging file") is an optional, hidden system file on a hard disk. The page file can be used to "back" (or support) system crash dumps and extend how much system-committed memory (also known as “virtual memory”) a system can back. It also enables the system to remove infrequently accessed modified pages from physical memory to let the system use physical memory more efficiently for more frequently accessed pages. 64-bit versions of Windows and Windows Server support more physical memory (RAM) than 32-bit versions support. However, the reason to configure the page file size has not changed. It has always been about supporting a system crash dump, if it is necessary, or extending the system commit limit, if it is necessary. For example, when a lot of physical memory is installed, a page file might not be required to back the system commit charge during peak usage. The available physical memory alone might be large enough to do this. However, a page file or a dedicated dump file might still be required to back a system crash dump. Use the following considerations for page file sizing for all versions of Windows and Windows Server:
|
System crash dump setting | Minimum page file size requirement |
---|---|
Small memory dump (256 KB) | 1 MB |
Kernel memory dump | Depends on kernel virtual memory usage |
Complete memory dump | 1 x RAM plus 257 MB* |
Automatic memory dump | Automatic selection of small, kernel, or complete memory dump |
* 1 MB of header data and device drivers can total 256 MB of secondary crash dump data.
Automatic memory dump
Windows 8 and Windows Server 2012 introduced the “Automatic memory dump” feature. This feature is enabled by default. This is a new setting, not a new kind of crash dump. This setting automatically selects the best system crash dump based on the frequency of system crashes.The Automatic memory dump setting at first selects a Small memory dump, which requires a page file or a dedicated dump file of at least 256 KB. If the system crashes, the Automatic memory dump feature selects a Kernel memory dump at startup. Then, it increases the minimum size of the system-managed page file or the system-managed dedicated dump file to back this kind of crash dump.
Kernel memory crash dumps require enough page file space or dedicated dump file space to accommodate the kernel mode side of virtual memory usage. If the system crashes again within four weeks of the previous crash, a Complete memory dump is selected at restart. This requires a page file or dedicated dump file of at least the size of physical memory (RAM) plus 1 MB for header information plus 256 MB for potential driver data to support all the potential data that is dumped from memory. Again, the system-managed page file or the system-managed dedicated dump file will be increased to back this kind of crash dump. If the system is configured to have a page file or a dedicated dump file of a specific size, make sure that the size is sufficient to back the crash dump setting that is listed in the table earlier in this section together with and the peak system commit charge.
For more information about system crash dumps, click the following article number to go to the article in the Microsoft Knowledge Base:
969028 How to generate a kernel or a complete memory dump file in Windows Server 2008 and Windows Server 2008 R2
Dedicated dump files
Computers that are running Microsoft Windows or Microsoft Windows Server usually must have a page file to back a system crash dump. System administrators now have the option to create a dedicated dump file instead by using the following software packages to start with:- Windows 7 Service Pack 1 with hotfix 2716542 applied
- Windows Server 2008 R2 Service Pack 1 with hotfix 2716542 applied
For more information about dedicated dump files, click the following article numbers to go to the articles in the Microsoft Knowledge Base:
969028 How to generate a kernel or a complete memory dump file in Windows Server 2008 and Windows Server 2008 R2
950858 Dedicated dump files are unexpectedly truncated to 4 GB on a computer that is running Windows Server 2008 or Windows Vista and that has more than 4 GB of physical memory
System-managed page files
By default, page files are system-managed. This means that the page files increase and decrease based on many factors, such as the amount of physical memory installed, the process of accommodating the system commit charge, and the process of accommodating a system crash dump.For example, when the system commit charge is more than 90 percent of the system commit limit, the page file is increased to back it. This continues to occur until the page file reaches three times the size of physical memory or 4 GB, whichever is larger. This all assumes that the logical disk that is hosting the page file is large enough to accommodate the growth.
The following table lists the minimum and maximum page file sizes of system-managed page files.
Operating system | Minimum page file size | Maximum page file size |
---|---|---|
Windows XP and Windows Server 2003 with less than 1 GB of RAM | 1.5 x RAM | 3 x RAM or 4 GB, whichever is larger |
Windows XP and Windows Server 2003 with more than 1 GB of RAM | 1 x RAM | 3 x RAM or 4 GB, whichever is larger |
Windows Vista and Windows Server 2008 | 1 x RAM | 3 x RAM or 4 GB, whichever is larger |
Windows 7 and Windows Server 2008 R2 | 1 x RAM | 3 x RAM or 4 GB, whichever is larger |
Windows 8 and Windows Server 2012 | Depends on crash dump setting* | 3 x RAM or 4 GB, whichever is larger |
Windows 8.1 and Windows Server 2012 R2 | Depends on crash dump setting* | 3 x RAM or 4 GB, whichever is larger |
* See system crash dumps.
Performance counters
Several performance counters are related to page files. This section describes the counters and what they measure.\Memory\Page/sec and other hard page fault counters
The following performance counters measure hard page faults (which include, but are not limited to, page file reads):- \Memory\Page/sec
- \Memory\Page Reads/sec
- \Memory\Page Inputs/sec
- \Memory\Page Writes/sec
- \Memory\Page Output/sec
- Parts of image files (.dll and .exe files) as they are used
- Memory-mapped files
- A page file
Therefore, we recommend that you monitor the disk performance of the logical disks that host a page file in correlation with these counters. Be aware that a system that has a sustained 100 hard page faults per second experiences 400 KB per second disk transfers. Most 7200 RPM disk drives can handle about 5 MB per second at an IO size of 16 KB or 800 KB per second at an IO size of 4 KB. No performance counter directly measures which logical disk the hard page faults are resolved for.
\Paging File(*)\% Usage
The \Paging File(*)\% Usage performance counter measures the percentage of usage of each page file. 100 percent usage of a page file does not indicate a performance problem as long as the system commit limit is not reached by the system commit charge, and if a significant amount of memory is not waiting to be written to a page file.Note The size of the Modified Page List (\Memory\Modified Page List Bytes) is the total of modified data that is waiting to be written to disk.
If the Modified Page List (a list of physical memory pages that are the least frequently accessed) contains a lot of memory, and if the % Usage value of all page files is greater than 90, you can make more physical memory available for more frequently access pages by increasing or adding a page file.
Note Not all the memory on the modified page list is written out to disk. Typically, several hundred megabytes of memory remains resident on the modified list.