Optimizing SMTPDA and the Domains directory
Document ID: 10391
Synopsis
This document explains how you can tweak SMTPDA to boost delivery performance. It also details how to resolve problems where some gateways or remote MTA's have specific limitations on ho
More Information
There are two parameters you can add to the Registry to help . SQL Connector users see the section labeled 'For SQL Implementations'. The location and values are:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMTPDA\Parameters
MsgLimit1 and DomainLimit1 (both DWORDS) come into play when messages are moved out of
incoming into holding, at which time the domain directories are created.
Normal operation (with both parameters set to 0) is like this:
- the RCP file for a message is read from incoming.
- for each recipient, a domain directory is created (if it does not already exist), and the recipient is written to an RCP file located in the directory.
- the MSG file is moved from incoming to holding
- the RCP file in incoming is deleted The above steps are executed for each message in the incoming directory.
The answer is the MsgLimit1 property. Suppose this is set to 50. During the process of moving the messages from incoming to holding, when the number of RCP files in a particular domain directory reaches 50, a new domain directory is created, and RCP files for subsequent messages are written in there. The first domain directory for aol.com is called aol.com, and subsequent domain directories are called aol.com$1, aol.com$2, etc. When each of these reaches 50, a new directory is created.
The problem with this approach is that you could end up with a huge number of directories and a huge number of threads. So, we introduce a second property called DomainLimit1. This is the maximum number of domain directories which may be created for a particular domain. If this is set to 10, then when ten directories (aol.com, aol.com$1, ..., aol.com$9) have been created, subsequent RCP files will be written to one of those directories (the directory which has fewest RCP files in it), rather than create a new directory.
The process of moving the messages from incoming into holding is most efficient when MsgLimit1 is 0 (i.e. no limit on the number of messages in a domain directory, so no other domain directories will be created). The more domain directories there are, the more work has to be done to determine which directory to use for a particular message. So, the combination of a large number of messages, a large number of domain directories, and a small MsgLimit1 value, will cause the incoming-holding process to be slow.
For the numbers you want to specify and assuming there are many different domains you
need to connect to, the following settings would apply:
These values can be adjusted to suit your needs.
For SQL Implementations
- Open SQL Enterprise Manager and navigate to the MailSite database
- Locate the MailServerProperties table
- Add the Following (Where X is the value you want):
ServiceName PropertyName ServerRoleId PropType PropIntValue PropStringValue SMTPDA MsgLimit1 0 4 X Null SMTPDA DomainLimit1 0 4 X Null
*If you are using MailSite 7 and later, then MailSite will create separate connections when sending messages for each different IP address the original messages was received from. So if your system has 2 IP addresses and you send 2 messages to Yahoo.com at the same time (one through each IP), you will see 2.rcp files in the Spool\Domains\yahoo.com folder. MailSite will make 2 separate connections to send these messages. If you have set UseDefaultOutboundIPAddress to 1 (see KB 10362), then MailSite will send the messages in one connection.