When 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.
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.
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.
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 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:
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.
Comparison of memory and CPU limits in the 32-bit and 64-bit versions of Windows
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 |
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 |
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.)
How to calculate page file size
Use one or more of the following methods to help you calculate page file size.Method 1: Use performance logs to understand the paging activity on your computer
- Click Start, point to Administrative Tools, and then click Performance.
- Expand Performance Logs and Alerts, click Counter Logs, right-click the blank space in the right-pane, and then clickNew Log Settings.
- In the Name box, type a name for the log, and then click OK.
- On the General tab, click Add Counters.
- Click Use local computer counters.
- In the Performance object list, click Paging File.
- Click Select counters from list, click % Usage, and then click Add.
- In the Performance object list, click Memory.
- In Select counters from list, click Available Bytes, and then click Add.
- In Select counters from list, click Pages Input/sec, click Add, and then click Close.
- Click OK.
Method 2: Use the Page File Bytes Peak counter to calculate page file size
- Click Start, point to Administrative Tools, and then click Performance.
- Click System Monitor.
- In the right pane, click + (the Add button).
- Click Use local computer counters.
- In the Performance object list, click Process.
- Click Select counters from list, click Page File Bytes Peak, click Add, and then click Close.
- Let the counter run during typical use of your computer.
- 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:- 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.
No comments:
Post a Comment