Thursday, January 22, 2009

Troubleshoot virtual memory fragmentation in Exchange Server 2003

Overview
Virtual memory fragmentation is a condition where virtual memory is available for a process, but none of the virtual memory blocks that are available are of a significant size. Memory fragmentation occurs over time because of the varying size of memory allocations and the varying lifetimes of each allocation. When you scale a server to handle more users and larger loads, the server may run low on virtual memory in the Microsoft Exchange Information Store process (Store.exe). When this issue occurs, event ID 9582 events are logged to the application event log. In some cases, event ID 9582 events do not indicate a problem with the virtual memory on the server, and the events can be ignored. However, in other situations, the lack of virtual memory may result in message-processing errors (indicated by event ID 12800 events) and decreased performance. If left unchecked, virtual memory fragmentation can result in severe performance degradation and unexpected behaviors. There is virtually no correlation between the amount of physical random access memory (RAM) that is installed in the computer and the amount of virtual memory. Because of this, you cannot resolve low virtual memory issues by adding more physical RAM. Additionally, virtual memory errors and virtual memory fragmentation issues are not limited to Active/Active server clusters. These issues also occur on Active/Passive server clusters and on stand-alone servers that are running Exchange 2003 or Exchange 2000.Note Virtual memory issues are more prevalent in a clustered Exchange 2003 configuration or a clustered Exchange 2000 configuration because these environments are typically used to scale Exchange to host multiple thousands of users together with multiple storage groups and multiple messaging databases.
Events:
Source: MSExchangeISCategory:
PerformanceID: 9582
Type: Warning
Description: The virtual memory necessary to run your Exchange server is fragmented in such a way that performance may be affected. It is highly recommended that you restart all Exchange services to correct this issue.
Action:
Prepare and perform the steps to shut down and then restart the server in the next 36 to 72 hours.
To determine the rate of decay, use the Performance Logs and Alerts tool to monitor the following counter for the MSExchangeIS performance object:
VM Total Large Free Block BytesUse this data to help you plan an appropriate time (in the next 36 to 72 hours) to shut down and then restart the server.
When an Exchange server has less than 16 MB of free contiguous virtual address space, the following error message is logged to the application event log:
Source: MSExchangeIS
Category: PerformanceID: 9582
Type: Error
Description: The virtual memory necessary to run your Exchange server is fragmented in such a way that performance may be affected. It is highly recommended that you restart all Exchange services to correct this issue.
At this level of virtual memory fragmentation, the Store.exe process cannot create additional heaps and cannot correctly mount and dismount storage groups. If the VM Largest Block Size counter is below 10 MB, the storage groups do not mount. When an event ID 9582 error message is logged, prepare to shut down and restart the server at the next opportunity. For example, shut down and then restart the server that evening or the next morning. By doing so, you may help prevent performance issues that may occur during peak usage times. When you shut down and then restart the server to clear virtual memory fragmentation, there are additional considerations when Exchange 2000 Server is configured in a clustered environment. When you move cluster resources from one node to another node, this process does not ensure a "clean" virtual memory address space. If cluster resources are owned by the destination cluster node, and the cluster resources are moved to the passive node (without first restarting the destination node), you may experience virtual memory fragmentation on the passive node. To avoid this situation, and to clear memory fragmentation in an Exchange 2000 Server clustered environment, follow these steps:
Restart the passive node before you move cluster resources to it. This step helps to make sure that the cluster resources are moved to a server that has a "clean" virtual memory address space.
Move the cluster resources to the passive node.
Restart the node that previously owned the cluster resources.Note Exchange Server 2003 restarts the Store.exe service automatically after the resource records have been moved to a different node in the cluster to reset the Store.exe address space on that node. Therefore, the next time that the Exchange virtual server is moved back to the passive node, the Store.exe is operating with a "clean" address space.

No comments:

Post a Comment