9
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: Crash dump setting: If you want a crash dump file to be created during a system crash, a page file or a dedicated dump file must exist and be large enough to back the system crash dump setting. Otherwise, a system memory dump file is not created. Peak system commit charge: The system commit charge cannot exceed the system commit limit. This limit is the sum of physical memory (RAM) and all page files combined. If no page files exist, the system commit limit is slightly less than the physical memory installed. Peak system-committed memory usage can vary greatly between systems. Therefore, physical memory and page file sizing also varies. Quantity of infrequently accessed pages: The purpose of a page file is to back infrequently accessed modified pages so that they can be removed from physical memory. This provides more available space for more frequently accessed pages. The "\Memory\Modified Page List Bytes" performance counter measures, in part, the number of infrequently accessed modified pages that are destined for the hard disk. However, be aware that 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. Therefore, consider extending or adding a page file if all the following conditions are true: o More available physical memory (\Memory\Available MBytes) is required. o The modified page list contains a significant amount of memory. o The existing page files are fairly full (\Paging Files(*)\% Usage).

A page file

Embed Size (px)

DESCRIPTION

System page file to improve performance

Citation preview

Page 1: A page file

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:

Crash dump setting: If you want a crash dump file to be created during a system crash, a page file or a dedicated dump file must exist and be large enough to back the system crash dump setting. Otherwise, a system memory dump file is not created.

Peak system commit charge: The system commit charge cannot exceed the system commit limit. This limit is the sum of physical memory (RAM) and all page files combined. If no page files exist, the system commit limit is slightly less than the physical memory installed. Peak system-committed memory usage can vary greatly between systems. Therefore, physical memory and page file sizing also varies.

Quantity of infrequently accessed pages: The purpose of a page file is to back infrequently accessed modified pages so that they can be removed from physical memory. This provides more available space for more frequently accessed pages. The "\Memory\Modified Page List Bytes" performance counter measures, in part, the number of infrequently accessed modified pages that are destined for the hard disk. However, be aware that 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. Therefore, consider extending or adding a page file if all the following conditions are true:o More available physical memory (\Memory\Available MBytes) is required.o The modified page list contains a significant amount of memory.o The existing page files are fairly full (\Paging Files(*)\% Usage).

Noteso Some products or services may require a page file for reasons other than

those discussed here. For more information, check your product documentation. For example, Windows Server domain controllers and DFS replication, certificate, and LDS servers (also Client editions) are not supported without a configured page file. The algorithm of the database cache for ESENT (ESE, in Microsoft Exchange Server) depends on the "\Memory\Transition Pages RePurposed/sec" performance monitor counter. A page file is required to make sure that the database cache can release memory if memory is requested by other services or applications. In summary, page file sizing depends on the system crash dump setting requirements and the system commit charge peak usage or expected usage. Both considerations are unique to each system, even for systems that are identical to other systems. This means that page file sizing is unique to each system and cannot be generalized.

Page 2: A page file

o For Windows Server 2012 Hyper-V and Windows Server 2012 R2 Hyper-V, the page file of the management OS (commonly called the host OS) should be left at the default of setting of "System Managed." This is per the Hyper-V product group.

System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you.Visit the Windows 7 Solution CenterExpand all | Collapse all

On This Page SUMMARY INTRODUCTIONo Comparison of memory and CPU limits in the 32-bit and 64-bit versions of Windowso The Pages/sec countero How to calculate page file size Method 1: Use performance logs to understand the paging activity on your computer Method 2: Use the Page File Bytes Peak counter to calculate page file size Method 3: Calculate the minimum and maximum page file sizeo Page file input/output rates MORE INFORMATIONo Technical support for x64-based versions of Microsoft Windows Properties Give Feedback

<style>.tocTitle, #tocDiv{display: none;}</style>

SUMMARYThe 64-bit versions of Microsoft Windows Server 2003 and Microsoft Windows XP can support more RAM than the 32-bit versions of these products. When lots of memory is added to a computer, a paging file may not be required. When you use the Pages/sec counter to measure paging file use, the value that is returned may not be accurate. To obtain an accurate measurement of paging file use, you must also use other performance counters. You can use System Monitor measurements to calculate the size of the paging file that your computer requires.

Windows Domain Controllers and DFS Replication, Certificate and ADAM/LDS Servers are not supported without a configured pagefile. Because the algorithm the LSASS database cache depends on the "transition pages repurposed/second" perfmon counter, a pagefile is required to make sure that the database cache is capable to release memory if memory is requested by other services or applications.

Back to the top | Give Feedback

INTRODUCTIONWhen you set up a 64-bit version of Microsoft Windows Server 2003 or Microsoft Windows XP, the operating system will create a page file that is one and a half times the amount of RAM that is installed in your computer. However, as the amount of RAM in a computer increases, the need for a page file decreases. The following guidelines and methods will help you determine the appropriate page file size for your system.

Comparison of memory and CPU limits in the 32-bit and 64-bit versions of Windows

Page 3: A page file

When you set up a 32-bit version or a 64-bit version of Windows Server 2003 or Windows XP, a page file is created that is one and a half times the amount of RAM that is installed in the computer provided there is sufficient free space on the system hard disk. However, as more RAM is added to a computer, the need for a page file decreases. If you have enough RAM installed in your computer, you may not require a page file at all, unless one is required by a specific application.

The following chart illustrates the amount of RAM and the number of CPUs that can be installed on a computer depending on the operating system that is installed. RAM and CPU limits are much larger in 64-bit operating systems than in 32-bit operating systems.

General memory limits

32-bit 64-bit

Total virtual address space

4 gigabytes (GB) 16 terabytes

Virtual address space per 32-bit process

2 GB, 3 GB if the system is booted with the /3GB switch

2 GB, 4 GB if the application is compiled with the /LARGEADDRESSAWARE switch

Virtual address space per 64-bit process

Not applicable 8 terabytes

Paged pool 470 megabytes (MB) 128 GB

Non-paged pool 256 MB 128 GB

System cache 1 GB 1 terabyte

Physical memory and CPU limits 32-bit 64-bit

Windows XP Professional 4 GB / 1-2 CPUs 128 GB / 1-2 CPUs

Windows Server 2003, Standard Edition

4 GB / 1-4 CPUs 32 GB / 1-4 CPUs

Windows Server 2003, Enterprise Edition

64 GB / 1-8 CPUs

1 terabyte / 1-8 CPUs

Windows Server 2003, Datacenter Edition

64 GB / 1-32 CPUs

1 terabyte / 1-64 CPUs

Windows Server 2003 SP1, Enterprise Edition

64 GB / 1-8 CPUs

1 terabyte / 1-8 CPUs

Windows Server 2003 SP1, Datacenter Edition

64 GB / 1-32 CPUs

1 terabyte / 1-64 CPUs

There is no specific recommendation for page file size. Your requirements will be based on the hardware and software that you use and the load that you put on the computer. To monitor page file usage and requirements, run System Monitor, and gather a log during typical usage conditions. Focus on the following counters.

Page 4: A page file

Counter threshold Suggested value

Memory\\Available Bytes No less than 4 MB

Memory\\Pages Input/sec No more than 10 pages

Paging File\\% Usage No more than 70 percent

Paging File\\% Usage Peak

No more than 70 percent

Process\\Page File Bytes Peak

Not applicable

Note Page file use should be tracked periodically. When you increase the use or the load on the system, you generally increase the demand for virtual address space and page file space.

The Pages/sec counter

When you use System Monitor, the values that are returned by the Pages/sec counter for the Memory performance object may be more than you expect. These values may not be related to either paging file activity or cache activity. Instead, these values may be caused by an application that is sequentially reading a memory-mapped file.

The Pages/sec counter counts the number of pages that are read from the disk or that are written to the disk to resolve memory references to pages. These pages were not in memory at the time of the reference. The Pages/sec value is the sum of the Pages Input/sec and Pages Output/sec counter values. The Pages/sec counter includes paging traffic on behalf of the system cache to access file data for applications.

Pages/sec is the primary counter to watch if you are concerned about excessive memory pressure (thrashing) and the excessive paging that may result.

However, the Pages/sec counter also accounts for other activity, such as the sequential reading of memory-mapped files that are either cached or not. Typically, the Pages/sec counter is counting other activity when you see the following:

A high value for the Memory: Pages/sec counter. An average value, relative to the system being monitored, or a high value for the

Memory: Available Bytes counter. An average or small value for the Paging File: % Usage counter. For a non-cached memory-mapped file, you also see average or low cache

activity. (Low cache activity is also known as cache fault activity.) Therefore, a high value for the Memory: Pages/sec counter does not necessarily indicate memory pressure or a System Monitor reporting error. To gain an accurate reading of your system, you must also monitor other counters.

How to calculate page file size

Use one or more of the following methods to help you calculate page file size.

Page 5: A page file

Method 1: Use performance logs to understand the paging activity on your computer

1. Click Start, point to Administrative Tools, and then click Performance.2. Expand Performance Logs and Alerts, click Counter Logs, right-click the

blank space in the right-pane, and then click New Log Settings.3. In the Name box, type a name for the log, and then click OK.4. On the General tab, click Add Counters.5. Click Use local computer counters.6. In the Performance object list, click Paging File.7. Click Select counters from list, click % Usage, and then click Add.8. In the Performance object list, click Memory.9. In Select counters from list, click Available Bytes, and then click Add.10. In Select counters from list, click Pages Input/sec, click Add, and then click

Close.11. Click OK.

Use the log that you collect during typical computer use to understand the paging activity on your computer. Then, adjust the page file size accordingly.

Method 2: Use the Page File Bytes Peak counter to calculate page file size

1. Click Start, point to Administrative Tools, and then click Performance.2. Click System Monitor.3. In the right pane, click + (the Add button). 4. Click Use local computer counters.5. In the Performance object list, click Process.6. Click Select counters from list, click Page File Bytes Peak, click Add, and

then click Close.7. Let the counter run during typical use of your computer.8. Note the maximum value for the Page File Bytes Peak counter, and then

multiply the value by 0.70. The sum of the equation is the size to set for your page file.

Method 3: Calculate the minimum and maximum page file size

To determine the approximate minimum page file that is required by your system, calculate the sum of peak private bytes that are used by each process on the system. Then, subtract the amount of memory on the system.

To determine the approximate maximum page file space that is required for your system, calculate the sum of peak private bytes that are used by each process on the system. Then, add a margin of additional space. Do not subtract the amount of memory on the system. The size of the additional margin can be adjusted based on your confidence in the snapshot data that is used to estimate page file requirements.

Note This estimate is accurate only if the snapshot of data that is used to make the calculations is accurate.

Page file input/output rates

To avoid overloading the system or other disks with page input/output (I/O) activity, use the following guidelines when you set up the page file on your computer:

Page 6: A page file

If the page I/O (real disk I/O) rate is more than 10 pages per second, we recommend that you do not put the page file where the I/O activity occurs on the system disk. When the page I/O rate is 10 pages per second or more, we recommend that you dedicate a separate hard disk for paging.

If the page I/O rate to a particular disk that is used for paging is more than 60 disk I/O operations per second, use more than one dedicated page hard disk to obtain better performance. To do this, use multiple non-striped disks for paging, or use raid 0 striped disks for paging. Dedicate approximately one I/O hard disk to paging for every 60 pages per second of I/O activity.

For example, if a system is averaging 150 pages of I/O activity per second, use three individual hard disks, or a three-disk raid 0 stripe set for the page file.

Note These estimates are for hard disks that run at 7200 revolutions per minute (rpm). If you use a hard disk that runs faster, the I/O rate a disk can handle for page I/O will increase.

Note If peak performance is critical to your system, use peak I/O rates instead of average I/O rates for these calculations.

Important Supportability Information: This article is specifically for computers that do not need kernel mode or full memory dump analysis. For business-critical servers where business processes require to server to capture physical memory dumps for analysis, the traditional model of the page file should be at least the size of physical ram plus 1 MB, or 1.5 times the default physical RAM. This makes sure that the free disk space of the operating system partition is large enough to hold the OS, hotfixes, installed applications, installed services, a dump file, and the page file. On a server that has 32 GB of memory, drive C may have to be at least 86 GB to 90 GB. This is 32 GB for memory dump, 48 GB for the page file (1.5 times the physical memory), 4 GB for the operating system, and 2 to 4 GB for the applications, the installed services, the temp files, and so on. Remember that a driver or kernel mode service leak could consume all free physical RAM. Therefore, a Windows Server 2003 x64 SP1-based server in 64-bit mode with 32GB of RAM could have a 32 GB kernel memory dump file, where you would expect only a 1 to 2 GB dump file in 32-bit mode. This behavior occurs because of the greatly increased memory pools.

For more information, click the following article number to view the article in the Microsoft Knowledge Base: 294418Comparison of 32-bit and 64-bit memory architecture for 64-bit editions of Windows XP and Windows Server 2003

Back to the top | Give Feedback

MORE INFORMATION

Technical support for x64-based versions of Microsoft Windows

If your hardware came with a Microsoft Windows x64 edition already installed, your hardware manufacturer provides technical support and assistance for the Windows x64 edition. In this case, your hardware manufacturer provides support because a Windows x64 edition was included with your hardware. Your hardware manufacturer might have customized the Windows x64 edition installation by using unique components. Unique components might include specific device drivers or might include optional settings to maximize the performance of the hardware. Microsoft will provide reasonable-effort assistance if you must have technical help with a Windows x64 edition. However, you might

Page 7: A page file

have to contact your manufacturer directly. Your manufacturer is best qualified to support the software that your manufacturer installed on the hardware. If you purchased a Windows x64 edition such as a Windows Server 2003 x64 edition separately, contact Microsoft for technical support.

For product information about Windows XP Professional x64 Edition, visit the following Microsoft Web site: http://www.microsoft.com/windowsxp/64bit/default.mspxFor product information about x64-based versions of Windows Server 2003, visit the following Microsoft Web site: http://www.microsoft.com/windowsserver2003/64bit/x64/default.mspx