PureMessage for UNIX: how do I set the concurrency limit?

  • Article ID: 35937
  • Rating:
  • 5 customers rated this article 3.4 out of 6
  • Updated: 13 May 2014

Each 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 51. 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

If 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:

define('confMAX_DAEMON_CHILDREN', 160)

You must restart sendmail for this setting to take effect.

If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent