Microsoft KB Archive/318228

= POP3 and IMAP4 Clients Experience Slow Log On and Poor Performance =

PSS ID Number: 318228

Article Last Modified on 10/9/2003

-

The information in this article applies to:


 * Microsoft Exchange Server 2003 Enterprise Edition
 * Microsoft Exchange Server 2003 Standard Edition
 * Microsoft Exchange 2000 Server
 * Microsoft Windows Small Business Server 2003, Premium Edition
 * Microsoft Windows Small Business Server 2003, Standard Edition

-



This article was previously published under Q318228



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
Post Office Protocol version 3 (POP3) and Internet Message Access Protocol, Version 4rev1 (IMAP4) clients may experience slow performance when they log on to a Microsoft Exchange-based server or download their e-mail messages.

When you connect to Transmission Control Protocol (TCP) port 110 by using the Telnet utility, the POP3 welcome banner is displayed quickly. However, when you type the USER command, and the PASS  command, you may experience a long delay before you are authenticated.



CAUSE
This behavior can occur because Exchange creates a global catalog lookup to locate the user's properties, and then forwards the authentication request to a domain controller. The DSAccess cache permits Exchange services to cache directory lookups without querying the global catalog. All directory access, apart from address book searches from Messaging Application Programming Interface (MAPI) clients and certain portions of Simple Mail Transfer Protocol (SMTP) inbound or outbound routing, goes through DSAccess and the DSAccess Cache. This feature increases the performance of the network and the servers running Active Directory.

By default, up to 4 megabytes (MBs) of directory entries are cached for a period of five minutes. You can use Windows 2000 Server System Monitor to monitor the effectiveness of the cache. Each client (such as POP3 authentication and SMTP inbound) can involve multiple cache entries. On front-end and back-end Exchange configurations under a high load with thousands of users, 4 MBs of cache might not be enough to give satisfactory logon times to clients.



RESOLUTION
To resolve this behavior, adjust the DSAccess cache settings by editing the Windows registry.

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

DSAccess Cache
The number of users, the maximum number of entries, the maximum cache size (memory), and the cache expiration time are all parameters that can affect the optimal size and performance of the DSAccess cache. The following registry keys gives you low-level control of the cache:
 * CacheTTL
 * MaxEntries
 * MaxMemory

Cache Expiration Time
The CacheTTL registry value sets the Time to Live setting for entries in the cache. In most situations, the Time to Live setting is governed by the user. You must use this registry value to determine the overall size of the DSAccess cache.

To set the Time to Live setting:

 Click Start, click the Run line, type regedit, and then click OK. Locate the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ServiceS\MSExchangeDSAccess\Instance0

NOTE: Create the Instance0 subkey if it does not already exist:

 On the Edit menu, point to New, and then click Key In the New Key #1 box that appears, type Instance0, and then press ENTER.  In the right pane of the Registry Editor window, right-click the CacheTTL value, and then click Modify.

NOTE: Create the CacheTTL value if it does not already exist:  On the Edit menu, point to New, and then click DWORD Value.</li> In the New Value #1 box that appears, type CacheTTL and then press ENTER.</li></ol> </li> In the Edit DWORD Value dialog box, type 600 in the Value data box, and then click OK.</li> Quit Registry Editor.</li></ol>

You can control the size of the DSAccess cache by adjusting the maximum number of entries (determined by the MaxEntries registry value), and the maximum cache size (determined by the MaxMemory registry value). You must repeatedly test the system performance as you adjust these entries to get the greatest level of performance for your installation. For example, a long Time to Live may result in increased memory consumption because cached entries are retained longer.

NOTE: Microsoft recommends that you configure the cache size by using the MaxMemory registry value. The advantage of using this value, opposed to the MaxEntries registry value, is that you have a greater degree of control over the memory usage of the server.

Maximum Number of Entries
Each client (such as POP3 and SMTP inbound clients) can involve multiple cache entries. The MaxEntries registry value sets the maximum number of entries in the DSAccess cache.

To properly set this registry value, you must first determine what user actions the server supports. Next, you must determine the number of entries that correspond to each of these user actions. If multiple user actions or protocols are supported, Microsoft recommends that the maximum number of entries that corresponds to a particular user action serve as the determining factor for this registry value. Finally, you set the registry key value to the product of the number of actions multiplied by the number of entries per action, plus the number of client actions you expect to cache at any particular time.

To set the maximum number of entries in the DSAccess cache:

 Start Registry Editor, and then locate the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeDSAccess\Instance0

NOTE: Create the Instance0 subkey if it does not already exist.

</li> In the right pane of the Registry Editor window, right-click the MaxEntries value.

NOTE: Create the MaxEntries value if it does not already exist:  On the Edit menu, point to New, and then click DWORD Value.</li> In the New Value #1 box that appears, type MaxEntries and then press ENTER.</li></ol> </li> In the Edit DWORD Value dialog box, type the value that you want in the Value data box, and then click OK. The default value of 0 (zero) permits unlimited entries.</li> Quit Registry Editor.</li></ol>

Maximum Cache Size (Memory)
Each client action (such as POP3 authentication and SMTP inbound) can involve multiple cache entries. Most client actions consume about 3.6 kilobytes (KBs) of cache memory. There is also 2.5 MB of memory overhead with DSAccess. You can use the following formula to configure the cache size of DSAccess:

MaxMemory = 3.6 * (Load Rate) * (CacheTTL) + 2500

If, for example, you set the Time to Live setting to the default value of 600 seconds, the server is expected to handle 20 client actions per second.

MaxMemory = 3.6 * 20 * 600 + 2500 = 45,700 Kb or 45.7 MB

To set the maximum cache size:

 Start Registry Editor, and then locate the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeDSAccess\Instance0.

NOTE: Create the Instance0 subkey if it does not already exist.</li> <li>In the right pane of the Registry Editor window, right-click the MaxMemory value.

NOTE: Create the MaxMemory value if it does not already exist: <ol style="list-style-type: lower-alpha;"> <li>On the Edit menu, point to New, and then click DWORD Value.</li> <li>In the New Value #1 box that appears, type MaxMemory and then press ENTER.</li></ol> </li> <li>In the Edit DWORD Value dialog box, type the value (in kilobytes) that you want in the Value data box, and then click OK. The default value is 4096.</li> <li>Quit Registry Editor.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
When you tune the caching for a particular network environment, it is important to get the correct balance between performance and data access. For example, while it is useful to increase the time that entries remain in the cache to reduce network traffic, a setting that is too high results in the cache becoming &quot;old&quot; or full of obsolete entries. Also, increasing the time that entries remain in the cache also increases the system memory that the cache uses. Because of this, you must carefully consider the environment before you make adjustments, and you must thoroughly test and document your changes.

For more information about other useful optimizing options, please visit the following Microsoft Web site:

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/exchange/reskit/ex00res/resguide/c31optim.asp

When a Microsoft Exchange 2000 Server has to look up address information for routing e-mail, for example, to resolve a user name in the directory, the server might select to forward the request to a local domain controller if the resolution can be processed in the domain. Exchange 2000 Server uses DNS to find the collection of domain controllers and uses them sequentially. If a local domain controller cannot service the request, the request is sent to a global catalog server where it can be resolved. If there is more than one global catalog server in a site, Exchange 2000 uses these on a round-robin basis. Exchange 2000 Server tries to connect to up to ten global catalog servers in the same Windows 2000 site as the Exchange server. If not all tries respond, Exchange 2000 Server tries to contact a global catalog server outside its Windows 2000 site.

If you have DNS problems or if all the global catalogs in the site are not responding, Exchange 2000 Server might have chosen a remote global catalog and domain controller, where a similar performance problem might occur. Verify local global catalog functionality, and then examine which global catalog and domain controllers have been selected by the Exchange 2000 Server. After Exchange 2000 Server, Service Pack 2 (SP2), you can directly open the Directory Access tab on the Server object to access (and change, if required) this information by using Exchange System Manager (ESM).

If Exchange Server is not responding on port 110, you may be experiencing a different problem. For additional information about this behavior, click the article number below to view the article in the Microsoft Knowledge Base:

292522 XCCC: Port 110 Is Not Responding on Exchange 2000 Server

If you also observe slow activity in Mdbdata folder, such as .stf files that exist in the file system or heavy transaction log creation, consider moving the Windows TMP or TEMP environment variables to another hard disk. POP3 and IMAP4 client activity may require extensive hard disk input and output (I/O) operations.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

317722 XADM: Client Latencies Occur Because Exchange 2000 Converts Mail from MAPI to MIME Format

Additional query words: reviewdocid gc dc ad XCCC

Keywords: kbprb KB318228

Technology: kbExchange2000Search kbExchange2000Serv kbExchange2000ServSearch kbExchangeSearch kbExchangeServ2003Ent kbExchangeServ2003Search kbExchangeServ2003St kbSBServ2003Pre kbSBServ2003Search kbSBServ2003St kbSBServSearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.