Concepts and Planning << >>

Memory

Windows NT Server uses virtual memory to swap data between physical and virtual memory as memory needs change. For example, if Microsoft Exchange Server needs more memory than is available, Window NT Server swaps data between the server's physical memory (RAM) and a temporary paging file on the server's disk. Typically, data that the server frequently accesses is stored in physical memory and is moved to the paging file when it is no longer needed. When the data is needed again, the operating system pages it back into physical memory.

If the most frequently accessed pages can't all fit into physical memory, excessive paging can occur. Paging can be considered as contention for memory. Some contention is tolerable, but as it increases, the system spends too much effort passing pages between physical memory and the paging file. Excessive paging is called thrashing, which is a common cause of unacceptable performance.

Typically, as memory contention increases enough to cause thrashing, response times increase exponentially. One indication of thrashing is that the CPU is under-used, but the I/O subsystem is working excessively. You should try to prevent thrashing, especially during mission-critical activities, by adding more memory ¾ not more disk space ¾ to the server.

Data is moved between database caches in physical memory and databases stored on the server's disk. Data currently needed for a process is stored in a database cache; it is moved to the database on the server's disk when the data is no longer needed. This process is similar to paging. For example, when a client requests that a message be opened, the information store moves the appropriate data from its database on disk to its database cache. As with thrashing, adding more RAM improves performance, in this case because more of the database can be cached in memory.

You can adjust the size of the database caches. If they are too large, even a server with a lot of physical memory may thrash severely. On the other hand, setting the cache sizes too small for the load on the server may cause excessive I/O operations to the database, because not enough information is cached in physical memory for the amount of load on the server. You can use the Microsoft Exchange Server Performance Optimizer to adjust cache sizes if needed. For more information, see the "Using the Performance Optimizer" section later in this chapter.