Exchange Server is notorious for devouring server memory. In this tip, I explain how the /3GB switch, /USERVA switch
and /PAE switch can help you manage Exchange Server 2003 memory and performance. I also share best practices you should employ so you don't cannibalize Windows Server 2003's memory in the process.
By default, Windows Server 2003 can address up to 4 GB of memory. The server doesn't actually need to have 4 GB of RAM installed though. Virtual memory allows Windows Server 2003 to address a full 4 GB, even if there is considerably less memory installed.
Also by default, Windows splits the 4 GB of addressable memory right down the middle. It reserves 2 GB of memory space to the Windows operating system and 2 GB for user-mode processes (applications).
The /3GB switch alters the balance of address space allocation. If the /3GB switch is applied, Windows will only allocate 1 GB of address space for the operating system, and leave a full 3 GB of address space for user-mode processes.
Conventional wisdom has long stated that you should apply the /3GB switch to the BOOT.INI file for any server that has 1 GB or more of physical RAM. However, Exchange Server can be a demanding application, so the 1 GB rule may not always be what's best for Exchange Server.
According to Microsoft, you should only use the /3GB switch on Exchange servers that are hosting mailboxes or public folders. If an Exchange server is simply acting as a front-end server, bridgehead server, or performing some other role that doesn't involve hosting mailboxes or public folders, it's best to allow the operating system access to the full 2 GB memory address space. (Microsoft did make the default 2 GB for a reason.)
Some people at Microsoft have even suggested that the /3GB switch is best avoided unless Exchange Server is hosting more than 20 mailboxes.
Microsoft also discourages the use of the /3GB switch if you are running Exchange Server on Windows 2003 Small Business Server, or if Exchange Server is running on a domain controller (running Exchange Server on a domain controller is not recommended).
The primary reason for not using the /3GB switch in some situations is that the Windows operating system makes page table entries (PTEs) for allocating memory. Windows has a finite amount of space that it can use for PTEs, and using the /3GB switch significantly reduces the space available for them.
If PTE space drops below a certain level, Windows has a tendency to become unstable. So it's often wise to provide the operating system with the full 2 GB of address space, unless Microsoft Exchange is the server's sole application and Exchange Server is hosting mailboxes and/or public folders.
You can provide Windows with more PTE space while still using the /3GB switch through the use of a BOOT.INI switch available in Windows Server 2003 called /USERVA.
The /USERVA switch can be used in conjunction with the /3GB switch to increase the available PTE space. For example, using the /USERVA switch with a value of 3030 (/USERVA=3030) will allocate an additional 42 MB of space to the PTEs.
It's worth pointing out though that Microsoft does not support arbitrary /USERVA values. Some applications actually have a documented /USERVA setting, but Exchange Server does not. That being the case, you will have to determine the appropriate /USERVA value by monitoring the Free System Page Table Entries counter in Performance Monitor.
With the /USERVA switch, lower numbers create more PTE space. Therefore, a value of 3,000 would create more PTE space than a value of 3,030. 3,030 is a good starting point, but if the System Page Table Entries counter drops below 7,000, it means that the system is not stable and there aren't enough PTEs available. You will then have to set the /USERVA value to a lower number to correct the problem.
According to Microsoft, the absolute lowest number that you can use as a /USERVA value is 2,800. But Microsoft also reports that it has yet to see an Exchange Server installation require a /USERVA value of lower than 2,900.
Some higher end servers support using more than 4 GB of RAM. If you have such a server and you are running Windows Server 2003 Enterprise Edition or Datacenter Edition, you can use the /PAE switch with the BOOT.INI file.
The /PAE switch tells Windows Server 2003 to use page translation to allow a 32-bit system to address more than 4 GB of memory (this is not necessary on 64-bit servers).
Using the /PAE switch allows more memory to be allocated to Exchange Server. But like the /3GB switch, the /PAE option also consumes PTE space.
The /3GB and the /PAE switches should never be used together under any circumstances.
About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Exchange Server, and has previously received Microsoft's MVP award for Windows Server and Internet Information Server (IIS). Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at http://www.brienposey.com.
MEMBER FEEDBACK TO THIS TIP
I have read on the Microsoft Web site that /PAE should never be used with Exchange Server 2003 on a Windows Server 2003 Enterprise server even if the server supports it. Is this true?
This is what is says in the Microsoft KB article 823440:
Because Exchange Server uses the /3GB switch as it scales up, the Exchange Server computer 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 computer can efficiently use.
My server has 6 GB of RAM. Please advise. Thanks!
This is one of those situations in which Microsoft produces contradictory information. Some Microsoft documents say that you should never use PAE, while others say that it's OK. I tend to think that you are probably better off staying away from PAE if possible, because using it can deplete your server of page table entries.
Brien Posey, tip author
Do you have comments on this tip? Let us know.
Related information from SearchExchange.com:
Please let others know how useful this tip was via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to SearchExchange.com. If we publish it, we'll send you a nifty thank-you gift.