Article ID: 815372 - Last Review: December 3, 2007 - Revision: 14.15 How to optimize memory usage in Exchange Server 2003On This PageSUMMARYImportant 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 This article describes the optimization of memory usage on your computer that is running Exchange Server 2003. 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, you will see event 9665 in Event Viewer. This message appears if one or more of the following conditions are true:
If you want to turn off the memory configuration check, you can create the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem Parameter: Suppress Memory
Configuration NotificationType: REG_DWORD Setting: 1 Notes
The following sections in this article contain recommendations for each of these settings. Virtual address space conceptsIndependent 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 you may want to manually adjust some of the 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 does not have any 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. To use this setting on a Windows 2000 Advanced Server-based computer, you must also configure the SystemPages registry in the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\SystemPages 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 Web site:http://technet.microsoft.com/en-us/library/aa996786.aspx
(http://technet.microsoft.com/en-us/library/aa996786.aspx)
This 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.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. In cases where a process tries to access this higher address space, a Stop error message on a blue screen 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: 266096
(http://support.microsoft.com/kb/266096/
)
Exchange 2000 requires /3GB switch with more than 1 gigabyte of physical RAM
If you are running Exchange 2003 on a Windows
Server 2003-based computer, and if the /3GB switch is set, we recommend that you set the /USERVA=3030 parameter in the Boot.ini file. This enables more system page
table entries (PTE) on the server.
For more information
about the /USERVA switch, click the following article number to view the article in the Microsoft Knowledge Base:
810371
(http://support.microsoft.com/kb/810371/
)
Using the /Userva switch on Windows Server 2003-based computers that are running Exchange Server
Make sure that the Store.exe process does not run
out of virtual address space. When the virtual address space is exhausted,
memory allocations will be unsuccessful even if there is a lot of physical RAM
available. To resolve this issue, you must restart the Information Store
service. For example, a server that has 2 GB of physical RAM without the /3GB switch set in the Boot.ini file will run out of memory when the
virtual address space for the Store.exe process reaches 2 GB. In this case,
Windows Task Manager may show that only about 1.5 GB of memory is actually
being used. However, the server is out of memory and the Information Store
service must be restarted.When virtual memory in the Store.exe process runs low, the performance of the Exchange Server 2003 server can decrease dramatically. 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:
Maximizing virtual address spaceIt 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 lower value than this, monitor the server more closely. If you experience a low virtual address space:
Store Database Cache sizeThe 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: Process The information gathered from the performance monitoring gives you
an accurate value for the virtual address space that the Store.exe process has
allocated. On a server with 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 with 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 Instance: STORE 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 may 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 sizeThe 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:
If you performed an in-place upgrade of an Exchange 5.5 Server computer 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:
Removing unnecessary video driversAn 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 do this, remove any third-party drivers, and then verify that only the default VGA driver is installed. You should 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 has been found to save around 1000 System PTEs or more. | Article Translations
|
Back to the top
