Article ID: 815372 - View products that this article applies to.
NoticeThis article is a consolidation of the following articles:
(http://support.microsoft.com/kb/316739/en-US/ )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/823440/en-US/ )Use of the /3GB switch in Exchange Server 2003 on a Windows Server 2003-based system
(http://support.microsoft.com/kb/810371/en-US/ )Using the /Userva switch on Windows Server 2003-based computers that are running Exchange Server
This article describes the optimization of memory usage on your computer that is running Exchange Server 2003.
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:
(http://support.microsoft.com/kb/322756/ )How to back up and restore the registry in Windows
If you have 1 gigabyte (GB) or more of physical memory (RAM) installed on a server that is running Microsoft Exchange Server 2003, you must make sure that Exchange 2003 can make efficient use of that memory.
Note Exchange 2003 performs an optimal memory configuration check when the store process starts. If the memory settings are not optimal, event 9665 is logged in Event Viewer. This message is logged if one or more of the following conditions are true:
The memory configuration check does not occur on servers that are running Microsoft Small Business Server. When the 9665 event is raised, a DWORD is written to the event log as additional data.
If you want to understand which settings are not set correctly, then running an Exchange Best Practices Analyzer tool health check will report what settings must be changed. For more information, visit the following Microsoft website:
Microsoft Exchange Best Practices Analyzer v2.8If you want to turn off the memory configuration check, you can create the following registry key:
Parameter: Suppress Memory Configuration Notification
Warning We do not recommend this configuration as it could lead to server degradation as it hides potential warning events from administrators.
The following sections in this article contain recommendations for each of these settings.
Things to check on Windows 2000 Server/Exchange Server 2000
Things to check on Windows Server 2003/Exchange Server 2003
Virtual address space concepts
Independent of the hardware configuration, the number of databases, and the number of users on the server, the Exchange Information Store (Store.exe) process in Exchange 2003 has a finite amount of memory that it can address. This amount is known as the virtual address space. In most scenarios, the usage of this virtual address space for the information store dictates the overall performance and scalability of the Exchange Server 2003 mailbox servers. For small to medium-sized servers, Exchange Server 2003 automatically makes the best balance. However, for larger servers that you may want to manually adjust some tuning parameters.
If the Exchange Server 2003 computer has 1 gigabyte (GB) of memory or more installed and if the computer is home to mailboxes or public folders, make sure that you add the /3GB switch to the Boot.ini file on the server. If the server has no mailboxes or public folders on it, such as a mail gateway, we do not recommend that you use the /3GB switch. By default, the Microsoft Windows 2000 Advanced Server and Windows Server 2003 operating systems reserve 2 GB of virtual address space for Kernel mode usage, and 2 GB for User mode. Virtual address space for a specific process is allocated at startup and increases as more memory is used during operation. Typically, the actual memory usage (the working set) of a process is much less than the address space allocated to that process. On a computer that is running Exchange Server 2003 with 1 GB or more of memory, you must modify the Windows 2000 Advanced Server and Windows Server 2003 operating systems so that 3 GB of User mode memory space is available. You can do this by using the /3GB switch in the Boot.ini file.
Using this switch reduces the memory available in the following system pools:
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 seem to stop responding.
For example, an Exchange server that has 2 GB of physical RAM that does not use the /3GB switch in the Boot.ini file will run out of memory when the Store.exe virtual address space reaches 2 GB. The Windows Task Manager shows that only about 1.5 GB is actually being used. However, the server will, in fact, be out of memory. You can monitor the virtual address consumption with performance monitoring. Add the Virtual Bytes counter for the Store.exe process to make sure of an accurate reading of the virtual space. The Store.exe process is the only Exchange process that you must monitor. Other Exchange processes do not grow large enough to cause any problems.
In addition to modifying the /3GB switch on a Windows 2000 Advanced Server-based computer or Windows Server 2003 computer, you must also configure the SystemPages registry in the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\SystemPagesFor a Windows 2000 Advanced Server-based computer, set the SystemPages registry entry to a DWORD value between 24000 and 31000 (decimal), and then click OK. If you are unsure which value to use, we recommend that you use 31000 (decimal). For more information, visit the following Microsoft website:
SystemPages set too highThis registry change is not required, nor do we recommend it on Windows 2003-based servers because this functionality is achieved by using the /USERVA switch that is outlined in a later section. Windows 2003-based servers should have the SystemPages value set to 0 for an optimal configuration.
Do not set the /3GB switch if you are running Windows 2000 Server Standard Edition. This memory tuning switch is not supported on Windows 2000 Server Standard Edition. Although the server will not generate an error message if you do this, the result of setting this switch is that a false memory address space will exist. When a process tries to access this higher address space, a Stop error message on a Stop error occurs, and the server stops responding.
Note The /3GB tuning switch is supported on all releases of Windows Server 2003 including Windows Server 2003 Standard Edition. For more information about how to set the /3GB switch, click the following article number to view the article in the Microsoft Knowledge Base:
266096Because Exchange Server uses the /3GB switch as it scales up, the Exchange Server cannot efficiently use more than 4 GB of RAM. Exchange Server does not support instancing, Physical Address Extension (PAE), or Address Windowing Extensions (AWE). Therefore, 4 GB of RAM is the maximum amount of memory that an Exchange Server can efficiently use.
(http://support.microsoft.com/kb/266096/en-US/ )Exchange 2000 requires /3GB switch with more than 1 gigabyte of physical RAM
The /USERVA switch is new to Windows Server 2003 and provides better detail for splitting memory allocations between user mode and kernel mode. This behavior lets you scale the server to a larger number of users without the risk of exhausting system resources. With the /USERVA switch, you can customize how the memory is allocated when you use the /3GB switch. The number following /USERVA= is how much memory in megabytes (MB) that will be allocated to each process. If you set /3GB /USERVA=3030, this reserves 3,030 MB of memory to the process space, compared to 3,072 MB when you use the /3GB switch alone. The 42 MB that is saved when you set /USERVA=3030 is used to increase the kernel memory space, free system page table entries (PTEs). The PTE memory pool is increased by the difference between 3 GB (specified by the /3GB switch) and the value that is assigned to the /USERVA switch.
It is best that you configure all Windows Server 2003-based servers that run Exchange and are configured by using the /3GB switch to also use the /USERVA=3030 switch to enable more overall system page table entries (PTE) on the server. After you install a Windows Server 2003-based server, you must modify the Boot.ini file to add the /3GB and /USERVA=3030 parameters to the startup line. For example:
[Boot Loader]Note The /USERVA parameter is only supported on Exchange servers when the value is set between 2,970 MB and 3,030 MB. Values that are less than 2,970 MB or greater than 3,030 MB are not supported. Only in extreme low PTE cases should a value that is less than 2,970 MB be used. The recommended default value for Exchange servers is 3,030 MB. If the PTEs has to be increased, you should reduce this value in 64 MB steps until the PTEs are greater than 12,000. Ideally, much greater values are recommended to provide additional headroom on any given server. Smaller numbers in the /USERVA would result in larger allocations of system pages. Do not modify the value to lower than /USERVA=2800 to try to gain more PTEs. Instead, contact Microsoft Customer Support Services.
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows Server 2003" /fastdetect /3GB /USERVA=3030
Monitoring Free System Page Table Entries
You can view low PTEs directly by using Performance Monitor. Look for the object Free System Page Table Entries under the Memory counter. Values that are less than 8,000 are too low and may cause server instability issues. Therefore, the /USERVA switch must be adjusted down to increase the overall amount of PTEs on the server. The target value for Free System PTEs is 12,000 or larger.
When virtual memory in the Store.exe process runs low, the performance of the Exchange Server 2003 server can decrease significantly. When the largest free block of virtual memory is reduced to 32 MB, an Event ID 9582 Warning event is generated in the Application log of the Event Viewer. When you see this event, it is best to restart the Store.exe process at the next available opportunity. If the largest block of memory is reduced even more, to the 16 MB level, an Event ID 9582 Error event is generated in the Application log of the Event Viewer. If this event occurs, the server is approaching a critical operating condition and must be restarted at the next opportunity. After this error occurs, memory may become exhausted in several hours. If you do not respond to these events, you may experience one or more of the following symptoms:
Removing unnecessary video drivers
An Exchange server will not typically require a powerful graphics card or driver. You should make sure that the only the default VGA driver is installed on the server to help increase the PTEs that are available on any given server. You should also add the /BASEVIDEO switch to the Boot.ini startup parameters. This will also force windows to use a less resource-intensive default VGA driver. This is found to save around 1000 System PTEs or more.
In addition to switching to the default VGA driver, we also recommend to remove any graphics card accelerator drivers that may have been installed with the original video card driver. These additional drivers require valuable resources that could reduce the memory available to system pools of the operating system.
Maximizing virtual address space
It is best to monitor the virtual address space for the Information Store on large mailbox servers to make sure that performance and stability does not decrease. The easiest way to do this is to monitor the VM Largest Block Size counter of the MSExchangeIS performance object in the Performance utility. This value is shown in bytes. After you start the computer, it is typical to see a sharp decrease in the largest virtual memory block size. However, after a day or two of operation, the value approaches a typical operating level. A value for the largest free virtual memory block that is more than 200,000,000 bytes (about 200 MB) indicates a healthy server. If you notice a reduced value than this, monitor the server more closely. If you experience a low virtual address space:
Store Database Cache size
The Store Database Cache is also known as the ESE buffer, and it provides a large caching area for database transactions before they are committed to the store. By default, Exchange Server 2003 queries the memory configuration of the local computer, and then allocates 896 MB of RAM if the /3GB switch is set in the Boot.ini file, or 576 MB of RAM if the /3GB switch is not set. Where a server is heavily loaded or where disk performance is not optimal, a large ESE buffer increases overall system performance. Depending on your configuration, you may have to increase or reduce the size of this buffer to obtain the best overall performance.
In a scenario where Exchange Server 2003 is used in an environment where it co-exists with other server-side programs, it may monopolize the available memory resources. The Dynamic Buffer Allocation (DBA) algorithm is responsible for returning memory to the operating system if other programs require it. However, you can manually limit the memory that Exchange Server 2003 uses by reducing the ESE buffer.
Warning On servers that have more than 2 GB of memory, it may help increase the size of the ESE buffer. Because of virtual address space limitations, this value must not be set greater than 1,200 MB.
Before you increase the maximum buffer size, we recommend that you use the Windows Performance utility to monitor the memory of the server under a typical load. To do this, monitor the following performance object and value:
Performance object: ProcessThe information collected from the performance monitoring gives you an accurate value for the virtual address space that the Store.exe process has allocated. On a server that has the /3GB switch set in the Boot.ini file, the value that is seen in the Performance utility is typically less than 2.5 GB. On a server without the /3GB switch set in the Boot.ini file, the value is typically less than 1.8 GB. It is best to add the /3GB switch to the Boot.ini file on servers that have 1 GB or more of installed memory. If you see values that are larger than those previously noted, for either configuration, do not increase the size of your maximum buffer size. If you see values that are less than previously noted, for either configuration, you may want to increase the size of the database maximum buffer size.
Performance counter: Virtual Bytes
For example, if you have a server that is configured to use the /3GB switch in the Boot.ini file, and performance monitoring shows the virtual bytes count at 2.5 GB when the server is heavily loaded, you may be able to increase your maximum buffer size by about 300 MB, for a total size of 1,200 MB.
Increasing the buffer size may adversely affect server performance. A larger buffer means that more virtual address space is consumed. Therefore, if the server experiences virtual memory address space constraints, increasing the buffer size may create operating system instability. This could lead to an unresponsive server. On a very large mailbox server, you may have to decrease the default buffer size to prevent system instability.
How to modify the ESE buffer size
The msExchESEParamCacheSizeMax parameter controls the ESE buffer size. Its value is expressed as a page count, and must be set to an exact multiple of 8192 for maximum efficiency:
Note The replay of transaction logs is significantly faster when the ESE buffer is set to a large size. You may want to temporarily increase the ESE buffer size to a value of 311296 in a disaster-recovery scenario.
If you performed an in-place upgrade of an Exchange 5.5 Server to Exchange 2000 Server, you may notice an unusually high value assigned to the msExchESEParamCacheSizeMax parameter. On some servers, this is a value that is equal to 2,048 MB. In this case, remove or reset the parameter to a more appropriate value. To modify the store database cache size:
Article ID: 815372 - Last Review: August 2, 2010 - Revision: 15.0