# Performance Notes

Performance issues for you to consider. If you never expect to have more than 100 simultaneous users, chances are any hardware you have will be fine. If you plan on having thousands or more users, please be sure to review this section.

If your configuration directory is not `/var/imap`, adjust accordingly.

- `/var/imap/proc` - After a successful login, the imapd creates a file in `/var/imap/proc` that is its unix process id. It also contains the name of any `SELECT`'d mailbox. The file is deleted when the user logs out.

  Given the potential load, this is a good candidate to move elsewhere. This can be done by symlink'ing the directory to another partition. We symlink it to a directory on a memory/viritual memory filesystem (specifically Solaris' tmpfs). If you use a tmpfs type filesystem, make sure that you have sufficient memory/swap to do this.

  Some people don't care about this information and just #ifdef out the code. We probably should add a `configure` option to do this.

- `/var/imap/deliverdb` - Unless you disable duplicate delivery suppression, each time a mail message is delivered it needs to lock the database and check to see if the message-id has been seen already. If you require really high throughput delivery, you may want to disable this feature. However, disabling this feature also disables Sieve support.

  We run with it enabled and it doesn't significantly impact our performance.

- `/var/spool/mqueue` - Sendmail can be pretty harsh on the spool partition. Having this on a separate disk is usually a good idea. Consider using LMTP and delivering from a separate machine.

- Unused SASL mechanisms - If you just build the SASL library and copied all the mechanisms into /usr/lib/sasl, the `imapd` will try to use them and allocate some amount of memory. In general, the operating system will swap out those pages but you may be allocating more swap space than you need. So, look in /usr/lib/sasl and if you don't plan on using those mechanisms, don't leave them there.

- You may want to increase the listen queue value when starting up the master process. For example, you may want to do this if you see the Listen queue drop counter increasing quickly. For example, under Solaris, look at the variable tcpListenDrop (from netstat -sP tcp).

last modified: $Date: 2001/05/01 02:00:07 $