pmx-milter process includes a perl interpreter that keeps large amounts of data in memory and loads a large number of modules. If the number of concurrent perl interpreters is not limited, PureMessage can spawn off new processes until all available physical memory is consumed, causing it to start using swap. Message processing using swap is much slower than with physical memory. This can compound the load problem to the point where the operating system is unresponsive.
The number of interpreters is determined by the
concurrency_limit setting in the
pmx.conf file. The default is calculated based on the amount of physical memory on the system. Ensure that your server has enough memory to handle the maximum number of concurrent interpreters. Setting a concurrency limit prevents the PureMessage process from consuming more than the amount of available memory.
What to do
Use the following formula to calculate the appropriate concurrency limit for your system.
concurrency_limit = physical memory (MB) / 250
For example, a machine with 2GB (2048MB) of memory should have a concurrency limit of 8. When running in threaded mode (Solaris only), round down the concurrency calculation to the nearest multiple of 20. For example, if the machine has 8 GB of physical memory, the formula would be:
8 * 1024 / 250 = 32.8
You would then round down this result to 32.
The size of pmx-milter processes can vary considerably based on:
- the length and complexity of the policy
- the match type and length of global lists and maps
- the number and length of end user lists
pmx-milter processes are generally much larger or smaller than 40MB (in non-threaded mode), a system-specific concurrency_limit should be calculated using this formula:
available memory (without pmx running)
concurrency_limit = ----------------------------------------
avg. size of pmx-milter processes - 10MB
On Solaris, divide the size of the largest running threaded
pmx-milter process by 20.
If you are using sendmail you should also edit sendmail's
MAX_DAEMON_CHILDREN setting in
sendmail.mc so that it matches the concurrency limit. For example, if the concurrency limit is 160, the
MAX_DAEMON_CHILDREN setting is:
You must restart sendmail for this setting to take effect.