Tmpfs for amavisd-new: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
{{WIP}}
{{WIP}}
'''This document gathers requirement and steps required to configure amavisd to use a ramdisk for its temporary data processing. The steps are specific to RHEL servers running Zimbra 6.x or higher.'''
'''This document gathers requirement and steps required to configure amavisd to use a ramdisk for its temporary data processing. The steps are specific to RHEL servers running Zimbra 6.x or higher.'''
__TOC__
__TOC__
=Note=
=Note=
Line 13: Line 10:
=Pre-requisites=
=Pre-requisites=
1. You need a kernel that is capable of creating and using a tmpfs filesystem
1. You need a kernel that is capable of creating and using a tmpfs filesystem
2.  
2. Zimbra 6.x or higher installed on the server.


=Sizing=
=Sizing=
If you run n amavisd-new instances and each one accepts mails of $message_size_limit, then you need a tmpfs of size will be.
If you run n amavisd-new instances and each one accepts mails of the size defined in zimbraMtaMaxMessageSize, then the tmpfs of size will be:
 
  n * (1 + max(expansionfactor)) * $message_size_limit
 
''n = "max_servers" option configured in /opt/zimbra/conf/amavisd.conf file. By default it set to 10.''
 
''zimbraMtaMaxMessageSize = It is a global config option in zimbra. It sets value for postconf message_size_limit. By default it is set to "10240000".''


n * (1 + max(expansionfactor)) * $message_size_limit


=Steps=
=Steps=

Revision as of 18:17, 8 August 2011

This document gathers requirement and steps required to configure amavisd to use a ramdisk for its temporary data processing. The steps are specific to RHEL servers running Zimbra 6.x or higher.

Note

This is not a Zimbra feature. I've documented the steps here just for reference who require amavisd with tmpfs. Please check Bug 13607 and Bug 8081 for more details.

Requirement

Amavisd-new's speed may be limited by the speed and latency of your disk I/O, which can causes huge active mail queue, with a very limited delivery rate. Moving amavisd tmp directory to ramdisk will eliminate disk read/write operations. It can make a lot of difference in amavisd mail processing speed.

Pre-requisites

1. You need a kernel that is capable of creating and using a tmpfs filesystem 2. Zimbra 6.x or higher installed on the server.

Sizing

If you run n amavisd-new instances and each one accepts mails of the size defined in zimbraMtaMaxMessageSize, then the tmpfs of size will be:

 n * (1 + max(expansionfactor)) * $message_size_limit 

n = "max_servers" option configured in /opt/zimbra/conf/amavisd.conf file. By default it set to 10.

zimbraMtaMaxMessageSize = It is a global config option in zimbra. It sets value for postconf message_size_limit. By default it is set to "10240000".


Steps

/etc/fstab /dev/shm /opt/zimbra/data/amavisd/tmp tmpfs defaults,noexec,nodev,nosuid,size=150m,mode=750,uid=7509,gid=54322 0 0

Stop zmamavisdctl

mount /opt/zimbra/data/amavisd/tmp

Start zmamavisdctl

Jump to: navigation, search