XSLT存档  

不及格的程序员-八神

 查看分类:  ASP.NET XML/XSLT JavaScripT   我的MSN空间Blog

How to use the /userva switch with the /3GB switch to tune the User-mode space to a value between 2 GB and 3 GB (316739)



The information in this article applies to:

  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Server 2003, Datacenter Edition
  • Microsoft Windows Server 2003, Standard Edition

This article was previously published under Q316739

SUMMARY

You can use the /userva=xxxx switch for more precise tuning of user and kernel virtual memory space in the Windows Server 2003 family. Use this new switch with the /3GB switch in the Boot.ini file to tune the User-mode space to a value between 2 and 3 gigabytes (GB), with the difference (3,072 less xxxx) being returned to Kernel mode. Note that xxxx is expressed in megabytes (MB).

The following sample Boot.ini file demonstrates how to use the new switch to tune a computer to allocate 2,900 MB of User-mode virtual memory and 1,196 MB of Kernel-mode virtual memory. This increases the available kernel space by 172 MB:

[Boot Loader]
Timeout=30
Default=multi(0)disk(0)rdisk(0)partition(2)\WINNT
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows Server 2003" /fastdetect /3GB /Userva=2900

MORE INFORMATION

The /userva=xxxx switch is designed to allow for more precise tuning of User-mode address space for program manufacturers who require more than 2 GB of User-mode space but do not require all the space that is provided by the /3GB tuning switch alone.

Note Using only the /3GB switch allocates 1 GB to the kernel and 3 GB to the User-mode space.

Using this switch reduces the memory available in the following system pools:
  • Nonpaged Pool
  • Paged Pool
  • System Page Table Entries (PTEs)
If the memory reduction in the pools is too great in a specific server installation, the server or the applications may generate an error or appear to stop responding.

In Windows Server 2003, you can add a small amount of the additional 1 GB back to the operating system. By decreasing the amount of User-mode space that is typically allocated by the /3GB switch, Windows Server 2003 increases the available kernel memory address space. This additional Kernel-mode address space is held in reserve and is used as additional address space for PTEs if the system runs out of free PTE space. This address space is not allocated to PTEs until the system runs low on PTE space.

In order to accurately see PTE space, use the !VM command in the debugger.

Note In Microsoft Windows XP and in Windows Server 2003, you can use this command interactively with the current debuggers that are available on the Microsoft download site.

Note Microsoft Product Support Services strongly recommends using a range of memory for the /userva=xxxx switch that is within the range of 2900 to 3030. This range is wide enough to provide a pool of system PTEs that is large enough for all currently observed issues. Typically, a value of 2800 for the xxxx placeholder will provide close to the maximum available number of system PTEs possible. Values observered in production for the 2800 setting are usually in the 50,000 - 70,000 free system pages, more than enough for all installations. If the value is less that 24,000, you should reduce this value in 64 MB steps until values larger than 24,000 to 26,000 are observed. Smaller numbers in the userva switch result in larger allocations of system pages. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

894067 The Performance tool does not accurately show the available Free System Page Table entries in Windows Server 2003



To make sure of program stability and Windows stability, program manufacturers must test their programs thoroughly by using the described tuning techniques and must provide the /userva=xxxx number for their programs. To help in this testing, manufacturers can use the System Monitor tool to monitor virtual address consumption. To do this, add the Virtual Bytes counter for the program's process to obtain an accurate reading of the virtual space.

Note Microsoft Product Support Services (PSS) does not support arbitrary /userva settings; customers should add this setting to the Boot.ini file only per a manufacturer's recommendation.

For more information about the /3GB switch, click the following article numbers to view the articles in the Microsoft Knowledge Base:

171793 Information on application use of 4GT RAM tuning

189293 Enabling 4GT RAM tuning when you use Windows NT Server Enterprise Edition

Windows Server 2003 no longer limits the System Paged Pool to 160 MB on computers that have lots of memory. Because the Paged Pool is not limited, you may be able to free additional Kernel-mode address space to use as PTE space when the computer is running with the /3GB switch by limiting the size of the System Paged Pool.

Modification Type: Major Last Reviewed: 4/16/2006
Keywords: kbenv kbinfo KB316739 kbAudITPRO


Understanding the /3GB and /USERVA switches, and Free System Page Table Entries

book

Article ID: 180345

calendar_today

Updated On: 17-11-2010

Products

IT Management Suite

Issue/Introduction

 

Resolution

Question
Can you give me some understanding of /3GB, /USERVA, and Free Page Table entries?

Answer
The following information is provided in the context of an Altiris Notification Server with or without a local Microsoft SQL* service.

 

Cheat Sheet for this document.
For most customers running Windows 2003: When using /3GB boot.ini switch, also include /USERVA=3008
 Sample c:\boot.ini file
-------------------------
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /NoExecute=OptIn /3GB /USERVA=3008

Become familiar with the maximum amount of physical RAM supported by your current Operating System edition: Table showing maximum addressable memory by Operating System edition, including PAE limits:
http://www.microsoft.com/whdc/system/platform/server/PAE/pae_os.mspx#ETG


Appropriate usage of the 3GB switch

The 3GB boot.ini switch increases user memory space and reduces system memory space (used by the kernel and file caching). Increasing user memory space is beneficial when running multiple large server applications that cannot address memory beyond the user space.  Examples of large server applications that cannot address memory beyond the user space include SQL 2000 standard edition, IIS, and the Notification Server service (aka the Altiris service), which is primarily composed of .NET 1.1 components. The diagrams below illustrate the difference in the amount of memory reserved for System Page Table Entries (PTEs) with and without the /3GB boot.ini switch enabled.
 

 

 



The following prerequisites must be met prior to using the /3GB switch in the C:\boot.ini file.

  • Server must be running at least Windows 2000* Advanced Server or any version of Windows 2003 Server.
  • Server must be running a 32-bit operating system (addressing restrictions no longer apply under a 64-bit operating system; however, Notification Server 6.x is not 64-bit compatible).
  • Server must have 4–16GB of memory

    To implement the switch, edit the C:\boot.ini file with a text file editor such as Notepad, append /3GB to the appropriate operating system line, and reboot the server. See the sample boot.ini provided at the beginning of this document.

Problems caused by the 3GB switch

When the 3GB switch reduces the amount of system space on the server, the total amount of Page Table Entries are drastically reduced. If the server ever reaches the point where there are no remaining free Page Table Entries, then a variety of out-of-memory related issues arise. Memory symptoms include:

  • Applications or drivers might have requests for memory denied
  • Applications or the entire system might become unresponsive if threads cannot be created
  • Event viewer may fail to display text, just icons
  • Registry access failures seen in the event logs
  • Swap file access failures seen in the event logs
  • "Harddisk9 read error at block 123456: status 0xC000009A" messages seen in the event logs

To avoid this issue, the amount of free table entries should be increased to a minimum of 8,000. This can be accomplished through the /USERVA boot.ini switch for Windows 2003 servers or a registry setting for Windows 2000 servers. See the following section for guidance on using the USERVA switch.

Appropriate usage of the USERVA switch

In Windows 2003, a new setting was added to facilitate changes in the amount of additional user space memory provided by the /3GB switch.  By default the /3GB switch establishes the cutoff point at 3072 MB. 

To identify if this switch is necessary on Windows 2003 SP1 servers: 

Open Performance Monitor on the server, add a new counter, select the Memory object, and then select Free System Page Table Entries.

Values returned by this counter object should range between 10,000 and 25,000. Values less than 8,000 are an area of concern.
 

 


Note: 
The above counter will under-report if SP1 for Windows 2003 has not been applied. For more details please visit http://support.microsoft.com/kb/894067. Alternative methods of tracking this value are beyond the scope of this document and require a debugger tool.


The following prerequisites must be met prior to using the /USERVA parameter in the boot.ini file:
  • Server must be running Windows 2003 Server
  • Server must be running a 32-bit operating system (addressing restrictions no longer apply under a 64-bit operating system; however, Notification Server 6.x is not 64-bit compatible)
  • Server must have 4–16GB of memory
  • Server should consistently have a low number of PTEs (<10,000)
To implement the switch:

Edit the C:\boot.ini file, append /USERVA=3008 to the appropriate operating system line and restart the server. 

If the 3008 value is insufficient, continue reducing in 32 MB increments.  Values below 2800 are not recommended. The amount of free PTE should become larger as the USERVA setting is decreased.
 

 

 


Appropriate usage of the PTE registry setting

As discussed previously, by default the /3GB switch establishes the cutoff point between the user space and the system space at 3072 MB. For Windows 2000, a registry key setting controls how many Page Table Entries are reserved during the server's startup.

To identify if the registry setting is necessary on Windows 2000 servers: 

Open Performance Monitor on the server, add a new counter, select the Memory object, and then select Free System Page Table Entries.

Values returned by this counter object should range between 10,000 and 25,000. Values less than 8,000 are an area of concern.
 

 



The following prerequisites must be met before implementing the registry setting:
  • Server must be running Windows 2000 Server.
  • Server must be running a 32-bit operating system (addressing restrictions no longer apply under a 64-bit operating system; however, Notification Server 6.x is not 64-bit compatible).
  • Server must have 4–16GB of memory.
  • Server should consistently have a low number of PTEs (<10,000).
To implement the setting:
  1. Open a registry editor, such as Regedit.exe or Regedt32.exe.
  2. Navigate to HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management.
  3. In the right-pane, double-click SystemPages.
  4. Name the new key "Queuing".
  5. Delete the existing value.
  6. Change the base to Decimal.
  7. In the Value data field, enter "25000" and click OK.
  8. Click OK to save the change, and then close the Registry Editor.
  9. Restart the server for the change to take effect.

 

 

 

 

Please review the following links applicable to /3gb switch.
Title : Use of the /3GB switch in Exchange Server 2003 on a Windows Server 2003-based system
http://support.microsoft.com/kb/823440/

Title : How to use the /userva switch with the /3GB switch to tune the User-mode space to a value between 2 GB and 3 GB
http://support.microsoft.com/kb/316739/

posted on 2023-01-30 23:51  不及格的程序员-八神  阅读(53)  评论(0编辑  收藏  举报