New: performance.tunning/concurrent.processing.md.

This commit is contained in:
Zhang Huangbin 2015-05-12 10:12:51 +08:00
parent 5882cfa741
commit 772e0406b5
5 changed files with 135 additions and 0 deletions

View File

@ -39,6 +39,7 @@ all_chapter_dirs="installation \
upgrade \
migrations \
howto \
performance.tunning \
integrations \
cluster \
troubleshooting \

View File

@ -0,0 +1,70 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Amavisd: process more emails concurrently</title>
<link href="./css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<div id="navigation">
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
// <a href="./index.html">Document Index</a>
</div><h1 id="amavisd-process-more-emails-concurrently">Amavisd: process more emails concurrently</h1>
<p>Amavisd-new is content filter, it will invoke SpamAssassin and ClamAV for
spam/virus scanning, it also offers additional features like DKIM signing and
verification.</p>
<p>In <a href="./file.location.html#amavisd">Amavisd config file</a>, <code>$max_servers</code> sets
the number of concurrent Amavisd processes and it must match the number set
in <code>/etc/postfix/master.cf</code> <code>maxproc</code> column for the <code>smtp-amavis</code> service.
Sample settings:</p>
<pre><code># File: /etc/amavisd/amavisd.conf
$max_servers = 4;
</code></pre>
<pre><code># File: /etc/postfix/master.cf
smtp-amavis unix - - - - 4 smtp
...
</code></pre>
<p>Both values should be identical for two reasons: If Amavisd offers more
processes than Postfix will ever use, Amavisd wastes resources. On the other
hand, if Postfix starts more dedicated transports than amavisd can handle
simultaneously, e-mail transport will be refused and logged as error.</p>
<p>If many emails stalled in mail queue (check with command <code>postqueue -p</code>), and
your server has powerful CPU and memory, you can increase the number of
concurrent Amavisd processes, so that it can process more emails at the same
time. Sample setting:</p>
<pre><code># File: /etc/amavisd/amavisd.conf
$max_servers = 10;
</code></pre>
<p>Restarting Amavisd service is required.</p>
<pre><code># File: /etc/postfix/master.cf
smtp-amavis unix - - - - 10 smtp
...
</code></pre>
<p>Note: If you don't want to modify <code>/etc/postfix/master.cf</code>, it's ok to set
<code>smtp-amavis_destination_concurrency_limit = 10</code> in <code>/etc/postfix/main.cf</code>
instead.</p>
<p>Restarting Postfix service is required if you modified <code>/etc/postfix/master.cf</code>,
reloading OR restarting is required if you modified <code>/etc/postfix/main.cf</code>.</p>
<p>References:</p>
<ul>
<li><a href="http://www.amavis.org">Amavisd web site</a></li>
<li><a href="http://www.ijs.si/software/amavisd/README.postfix.html">Integrating amavisd-new in Postfix</a></li>
</ul><p style="text-align: center; color: grey;">Document published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
</script>
</body></html>

View File

@ -90,6 +90,10 @@
<ul>
<li><a href="http://www.iredmail.org/forum/topic8169-iredmail-support-antispam-via-dovecot-and-spamassassin.html">Anti-spam with Dovecot antispam plugin and SpamAssassin</a>, contributed by Dexus.</li>
</ul>
<h3 id="performance-tunning">Performance tunning</h3>
<ul>
<li><a href="concurrent.processing.html">Amavisd: process more emails concurrently</a></li>
</ul>
<h3 id="third-party-integrations">Third-party integrations</h3>
<p>Below tutorials are maintained by iRedMail project.</p>
<ul>

View File

@ -0,0 +1 @@
Performance tunning

View File

@ -0,0 +1,59 @@
# Amavisd: process more emails concurrently
Amavisd-new is content filter, it will invoke SpamAssassin and ClamAV for
spam/virus scanning, it also offers additional features like DKIM signing and
verification.
In [Amavisd config file](./file.location.html#amavisd), `$max_servers` sets
the number of concurrent Amavisd processes and it must match the number set
in `/etc/postfix/master.cf` `maxproc` column for the `smtp-amavis` service.
Sample settings:
```
# File: /etc/amavisd/amavisd.conf
$max_servers = 4;
```
```
# File: /etc/postfix/master.cf
smtp-amavis unix - - - - 4 smtp
...
```
Both values should be identical for two reasons: If Amavisd offers more
processes than Postfix will ever use, Amavisd wastes resources. On the other
hand, if Postfix starts more dedicated transports than amavisd can handle
simultaneously, e-mail transport will be refused and logged as error.
If many emails stalled in mail queue (check with command `postqueue -p`), and
your server has powerful CPU and memory, you can increase the number of
concurrent Amavisd processes, so that it can process more emails at the same
time. Sample setting:
```
# File: /etc/amavisd/amavisd.conf
$max_servers = 10;
```
Restarting Amavisd service is required.
```
# File: /etc/postfix/master.cf
smtp-amavis unix - - - - 10 smtp
...
```
Note: If you don't want to modify `/etc/postfix/master.cf`, it's ok to set
`smtp-amavis_destination_concurrency_limit = 10` in `/etc/postfix/main.cf`
instead.
Restarting Postfix service is required if you modified `/etc/postfix/master.cf`,
reloading OR restarting is required if you modified `/etc/postfix/main.cf`.
References:
* [Amavisd web site](http://www.amavis.org)
* [Integrating amavisd-new in Postfix](http://www.ijs.si/software/amavisd/README.postfix.html)