DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 247904 - Last Review: March 2, 2007 - Revision: 2.5

This article was previously published under Q247904
Notice
This article applies to Windows 2000. Support for Windows 2000 ends on July 13, 2010. The Windows 2000 End-of-Support Solution Center (http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fwin2000) is a starting point for planning your migration strategy from Windows 2000. For more information see the Microsoft Support Lifecycle Policy (http://support.microsoft.com/lifecycle/) .

SUMMARY

This article describes how to adjust the size of the Paged Address Pool and System Page Table Entry (SystemPTE) memory areas in Windows 2000-based computers running the Microsoft Terminal Server service.

MORE INFORMATION

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756  (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows

Windows 2000 can directly address up to 2^32 bytes or 4 gigabytes (GB) of memory address space, regardless of how much physical Random Access Memory (RAM) is installed. By default, 2 GB of this address space is allocated to each process, and 2 GB is allocated to the kernel. While separate 2 GB regions of address space are used for each process in the computer, most of the 2 GB kernel area is global and remains the same no matter which user-mode process is currently active.

The 2 GB of kernel area contains all system data structures and information. Therefore, the 2 GB kernel address space area can impose a limit on the number of system data structures and the amount of kernel information that can be stored on a computer, regardless of how much RAM is installed.

The two types of data that share a portion of this 2 GB address area are Paged Pool allocations, and kernel stack allocations. Paged Pool allocations are memory allocations made by kernel-mode components. Kernel stack allocations are stacks created in the kernel for each thread to use for making system calls. Paged pool allocations are made in the Paged Pool area, and kernel stack allocations are made in the System Page Table Entry (PTE) area.

While these different allocations share the same area, the partition between them is fixed at startup. If the operating system runs out of space in one of those areas, the other area cannot donate space to it, and programs may begin to encounter unexpected errors. Therefore, when you encounter a Windows 2000-based computer that is experiencing unexpected errors or an inability to accept new logins, and the computer does not have some other resource limitation such as Central Processing Unit (CPU) or disk bottlenecks, it is highly likely that the Paged Pool or System PTE areas are becoming low on disk space. Because, by default, the System PTE area is sized to be as large as possible on a computer with Terminal Services enabled, the limitation will usually be due to insufficient Paged Pool address space. Fortunately on some computers, the System PTE area can be configured to be smaller, which can alleviate these symptoms and allow more users access to the computer.

To determine if your computer has run out of one or more of these resources:
  1. Attach a kernel debugger to the computer.
  2. Use a text editor to add the /DEBUG parameter to the Boot.ini file.
  3. Restart the computer.
For additional information about using a kernel debugger, click the article number below to view the article in the Microsoft Knowledge Base:
151981  (http://support.microsoft.com/kb/151981/EN-US/ ) How to Set Up a Remote Debug Session Using a Null Modem Cable
When you believe the system has reached a limit:
  1. Break in to the debugger.
  2. Type !vm , and then press ENTER.
  3. If the debugger output shows any errors, type !reload, and then press ENTER, to ensure you have the correct symbols.
The following is a sample debug session. The data of interest is in bold type for clarity:

*** Virtual Memory Usage ***
Physical Memory: 1032075 ( 4128300 Kb)
Page File: \??\C:\pagefile.sys
Current: 4190208Kb
Minimum: 4190208Kb
Maximum: 4190208Kb
Available Pages: 599741 ( 2398964 Kb)
ResAvail Pages: 894259 ( 3577036 Kb)
Modified Pages: 757 ( 3028 Kb)
NonPagedPool Usage: 15084 ( 60336 Kb)
NonPagedPool Max: 71586 ( 286344 Kb)
PagedPool 0 Usage: 22953 ( 91812 Kb)
PagedPool 1 Usage: 4324 ( 17296 Kb)
PagedPool 2 Usage: 4315 ( 17260 Kb)
PagedPool 3 Usage: 4360 ( 17440 Kb)
PagedPool 4 Usage: 4366 ( 17464 Kb)
********** Excessive Paged Pool Usage *****
PagedPool Usage: 40318 ( 161272 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)
Shared Commit: 30133 ( 120532 Kb)
Special Pool: 0 ( 0 Kb)
Free System PTEs: 47920 ( 191680 Kb)
Shared Process: 99141 ( 396564 Kb)
PagedPool Commit: 40318 ( 161272 Kb)
Driver Commit: 770 ( 3080 Kb)
Committed pages: 822746 ( 3290984 Kb)
Commit limit: 2037826 ( 8151304 Kb)
Total Private: 545122 ( 2180488 Kb)
The "********** Excessive Paged Pool Usage *****" entry in this output listing is indicative of a computer that is low on paged pool resources. This may be confirmed by noting that the PagedPool Usage entry is very close to the PagedPool Maximum entry.

In order to configure the partition between System PTE space and Paged Pool space on a computer with a clean Windows 2000 installation, the computer must be out of paged pool resources, and the computer must have a significant amount of Free System PTE space remaining. The amount of Free System PTE space should be 40,000K or greater. If the computer is out of Free System PTE space, you cannot use the following method to get more users logged in to Terminal Server.

To tune the computer for the optimal balance between paged pool space and system PTE space:
  1. Restart the computer, and then log in.
  2. Break into the debugger, type !vm, and then press ENTER.
  3. Write down the values of PagedPool Maximum, PagedPool Used, and Free System PTEs. The values to write down are in kilobytes, and are enclosed in parentheses.
  4. At the debug host computer, type g, and then press ENTER.
  5. At the target computer, log in 10 Terminal Server users, and keep them all logged in. Do not disturb the server in any way, other than as required by this procedure.
  6. For all 10 sessions, start all the programs you expect the users to be running at one time. This is going to be the representative sample of your users. The programs these sessions are running should be representative of what all the users on this system will be running at any point in time in your normal production environment. For best results, any remote users should perform a few actions considered normal for the programs they are running. For example, in a word processing program, the users would type, or in a line-of-business program, the users might enter a few orders.
  7. Break into the debugger, type !vm, and then press ENTER.
  8. Write down the values of PagedPool Used and Free System PTEs.
  9. Perform the following calculations:

    1. amount of paged pool per user=(amount of paged pool used final-amount of paged pool used initially)/10

      where amount of paged pool per user is the amount of paged pool per user, amount of paged pool used final is the amount of paged pool used final, and amount of paged pool used initially is the amount of paged pool used initially.
    2. amount of system PTEs per user=(amount of free system PTEs initial-amount of free system PTEs final)/10

      where amount of system PTEs per user is the amount of system PTEs per user, amount of free system PTEs initial is the amount of free system PTEs initial, and amount of free system PTEs final is the amount of free system PTEs final.
  10. To modify the registry:

    1. Determine the available virtual address space as well as the virtual space needed per user:

      AvailableVirtualSpace = PagedPoolMaximum + FreeSystemPTEsinitial - PagedPoolUsedinitial

      where AvailableVirtualSpace is the amount of available virtual space, PagedPoolMaximum is the amount of paged pool maximum, FreeSystemPTEsinitial is the amount of free system PTEs initially, and PagedPoolUsedinitial is the amount of paged pool used initially.
    2. Using the following formula, determine how much virtual space is required per user:

      VirtualSpacePerUser = PagedPoolPerUser + SystemPTEsPerUser

      where VirtualSpacePerUser is the amount of virtual space required per user, PagedPoolPerUser is the amount of paged pool per user, and SystemPTEsPerUser is the amount of system PTEs per user.
    3. Using the following formula, determine how many users this computer could theoretically support:

      MaxUsers = AvailableVirtualSpace / VirtualSpacePerUser

      where MaxUsers is the maximum number of users, AvailableVirtualSpace is the amount of available virtual space, and VirtualSpacePerUser is the amount of virtual space per user.
    4. Using the following formula, determine how much System PTE space is needed:

      PTErequired = SystemPTEsPerUser x MaxUsers

      where PTErequired is the amount of PTEs required, SystemPTEsPerUser is the number of PTEs per user, and MaxUsers is the maximum number of users.
    5. Using the following formulas, calculate the amount of excess PTEs and SystemPages:
      PTEexcess= FreeSystemPTEsinitial - PTErequired

      where PTEexcess is the amount of excess PTEs, FreeSystemPTEsinitial is the amount of free system PTEs initially, and PTErequired is the amount of PTEs required.
      Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
      322756  (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows

    6. From a command prompt, use the registry editor (Regedit32.exe) to modify the SystemPages value in HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management\SystemPages to the value computed from the following formula:

      SystemPages = 50,000 - (PTEexcess / 4) (Rounded to the nearest integer.)

      where SystemPages is the number of system pages, and PTEexcess is the amount of excess PTEs.

      If the computed value of SystemPages is below 7,000, set the value to 7,000. If the computed value is above 50,000, then your address space boundary is already configured for the maximum amount of users.
    7. Restart the computer, break into the debugger, type !vm, and then press ENTER.
    8. Verify that the Paged Pool Maximum has increased and the System PTE space has decreased.

APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server
Keywords: 
kbenv kbhowto KB247904
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support