Subscribe to Windows IT Pro
May 01, 1998 12:00 AM

Paging Peformance

Windows IT Pro
InstantDoc ID #3615
Rating: (0)

Task Manager. Task Manager lets you easily check for the correct paging file size. Task Manager shows you how the system is using the paging file and gives you other vital system information. To run Task Manager in NT 4.0, press Ctrl+Alt+Del and select Task Manager, or right-click the taskbar and select Task Manager. After you start Task Manager, click the Performance tab to get realtime system statistics, as Screen 2 shows. The most important paging file size information on the Performance tab is the Commit Charge section. This section tells you whether the Commit Peak (the highest amount of physical and virtual memory the system has allocated to processes thus far) has approached or exceeded the Commit Limit or the system's physical memory. Commit Limit is the amount of virtual memory that the system can commit to memory without expanding the paging file.

As paging activity increases, the Commit Total (committed memory) also increases. The system needs to expand the paging file as the Commit Total approaches the Commit Limit. The goal is to prevent the paging file from expanding, so you need to keep the Commit Total from approaching the Commit Limit. The worst case occurs when the two values are equal and the paging file can't grow to meet system requirements.

Task Manager's Commit Charge section also tells you whether the system's main memory can accommodate system tasks. If the Commit Total regularly exceeds the system's RAM, the system might not have enough physical memory. For example, if a system with 64MB of RAM also has a Commit Total of 64MB, the system needs additional physical memory.

NT Diagnostics. Like Task Manager, NT Diagnostics displays system statistics related to processes and memory. However, this tool doesn't present information in realtime. You must manually refresh the display to get current information. On the Memory tab, click Refresh, which Screen 3 shows. NT Diagnostics is useful in estimating but not calculating a minimum paging file size.

Performance Monitor. Perfmon is the best and most reliable tool for determining a minimum paging file size. Perfmon lets you monitor counters that pertain to virtual memory. Before you start monitoring the counters, follow Microsoft's recommendation (physical RAM + 11MB) to set the minimum paging file size. Then you can monitor typical operations' memory use.

The four main counters for monitoring virtual memory are Memory: Committed Bytes, Memory: Commit Limit, Paging File: % Usage, and Paging File: % Usage Peak. The following list explains how each of these counters helps you determine minimum paging file requirements:

  • Memory: Committed Bytes shows the amount of virtual memory that processes are currently using. Memory: Committed Bytes is the amount of committed rather than reserved virtual memory.
  • Memory: Commit Limit shows the amount of virtual memory the system can commit without expanding the paging file. Commit Limit equals physical memory plus the paging file size, minus the memory reserved for the operating system (OS­which is a dynamic value).
  • Paging File: % Usage shows the percentage of the paging file that processes are currently using.
  • Paging File: % Usage Peak shows the highest percentage of space the paging file is using.

The Committed Bytes and Commit Limit counters work side by side. If you monitor the counters separately, you won't have enough information to properly set the paging file's minimum size. You must monitor both counters to determine whether the paging file is approaching or has reached full capacity. When the Committed Bytes approaches the Commit Limit, the system is running out of virtual memory. The system will warn you of this problem, as Screen 4 shows. You must then close some applications, manually increase the paging file, and restart the system. Committed Bytes won't exceed the Commit Limit if you configure the minimum paging file size properly. You can add an alerting mechanism that will warn you if the Committed Bytes value becomes too large. Perfmon can also alert you when the Committed Bytes is within 20 percent of the Commit Limit.

To add and configure alerts in Perfmon, choose Alert from the View menu. Next, select Add to Alert from the Edit menu to add counters. Choose the object you want to monitor and the appropriate counter within it. For example, choose the Memory: Commit Limit counter. For the Alert If option, specify a value for the counter. Select Over if you want Perfmon to trigger an alert when the counter exceeds this value, or Under if you want Perfmon to trigger an alert when the counter falls below this value. In the Run Program on Alert box, you might want to specify an application, such as paging software, to run. When you finish configuring the alert options for the counter, click Add to add the counter to the alerting scheme.

If the Committed Bytes counter equals or exceeds the Commit Limit, the system is experiencing excessive hard page faults because you haven't properly configured the minimum and maximum paging file size to meet memory usage requirements. A hard page fault occurs when the system has to retrieve a page from the hard disk rather than main memory; hard page faults significantly delay performance. The Memory: Pages/sec counter shows the number of hard page faults. When the system runs low on virtual memory, the Memory: Pages/sec counter exceeds 20 pages per second, and system performance decreases significantly. To prevent this problem, increase the paging file size to accommodate the largest memory usage requirements.

Other counters you can use to determine minimum paging file size are Paging File: % Usage and Paging File: % Usage Peak. You can use these counters together or monitor them separately to determine what percentage of the paging file the system is using. Recommended values are % Usage counter below 40 percent and % Usage Peak below 75 percent. If the counters stay in the acceptable ranges, the system won't have to increase the paging file.

You can use these counters to estimate how much physical memory the system needs to keep from relying on the paging file. For example, if the minimum paging file size is 80MB and the % Usage counter averages 20 percent, you can add 16MB of RAM to the system and thus reduce the percent usage. In this case, 20 percent paging file use tells you that if you add memory equal to 20 percent of the paging file, the system's main memory will accommodate most server functions without relying on the paging file.

You also need to consider maximum paging file size to boost the paging performance on your system. The maximum value is the highest value you expect the paging file to grow, and you must have enough free hard disk space to accommodate this limit. A general rule is to set the maximum paging file value at the minimum value plus 50 percent. However, if you configure the minimum paging file size properly, the system is unlikely to approach the maximum value. Your paging performance will be optimal if you properly configure the minimum paging file size and set the maximum paging file size to the recommended value.

Recommendations
NT's reliance on paging can benefit the system and user applications, but paging sometimes negatively affects performance. You can't always add memory to the system configuration, and adding memory doesn't necessarily correct paging performance problems. However, you'll want to configure your system with as much memory as possible because it's currently inexpensive. You must consider several alternatives to increase your system's paging performance, including proactive monitoring, proper paging file configuration, and location. If you properly configure the minimum and maximum paging file size, you reduce the risk of compromising performance during peak memory utilization periods.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Jan 11, 2005

    MY SYSTEM WONT ALLOW ME TO GET INTO WINDOWS BECAUSE MY PAGE FILE IS TO SMALL, CAN YOU HELP ME

  • Michael Vuister
    13 years ago
    Aug 11, 1999

    In “Paging Performance” (May), Kenton Gardinier states that a system with multiple hard disks can make simultaneous I/O requests to the various hard disks. This statement is true for SCSI disks, which have queuing, but is it true for EIDE disks, which process only one request at a time? (Hard disks are rarely connected to the secondary EIDE controller, so the primary controller processes all requests for hard disk access.)
    The author also states that the worst case occurs when the initial and maximum paging file sizes are equal. I purposely set the values equal (and large) to prevent paging file fragmentation. Perhaps the article could have included instructions to address paging file fragmentation (e.g., use Control Panel to put the file temporarily on another partition, run a defragmentation utility, and put the file back).

    --Michael Vuister



    I agree with your statement regarding the disk subsystem configuration. The article should have included clarification.
    The paging file fragments under only two conditions: You have a low amount of disk space during the creation of the paging file at startup, or the paging file is forced to grow beyond the minimum value during normal operation. If the paging file needs more space, it dynamically increases as needed (and with a warning) up to the maximum value. After the paging file grows to the maximum value, the system becomes unstable and can crash. In your configuration, you might be wasting disk space and not providing any padding to prevent instability. In other words, what happens to your system if the paging file reaches the minimum or maximum value?

    --Kenton Gardinier

  • Al Mulnick
    13 years ago
    Aug 11, 1999

    I read and thoroughly enjoyed Kenton Gardinier’s “Paging Performance” (May) about monitoring and tuning the paging file to improve performance. I’d like to point out that following the advice in the article and dividing the swap file across different disks will prevent the creation of a memory.dmp file in the event of a blue screen trap. Windows NT displays a warning about this situation, which might be acceptable to some users.

    --Al Mulnick




    NT doesn’t create a memory dump after a system crash in several situations: for example, when the %SYSTEMROOT% partition or other specified path does not have enough space, you haven’t selected the overwrite option, or you haven’t selected an adequate paging file size on the %SYSTEMROOT% partition. In the article, I didn’t mention the correlation between paging file size and memory dumps. To allow memory dumps, you must keep a paging file on the system partition with a size equal to or greater than the amount of physical memory plus an additional MB. Thanks for mentioning this point.
    --Kenton Gardinier

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.