Performance tuning

Disk I/O optimization

Usually heavily loaded IMAP and POP3 servers don’t use much CPU, but they use all the disk I/O they can get. So reducing disk I/O is probably the most useful optimization you can do.

CPU usage optimization

  • See Login processes for optimizing CPU usage caused by logins

  • See auth_cache_size setting for caching passdb and userdb lookups

  • Services having client_limit>1 and process_limit>1, set process_min_avail to the number of CPU cores.

  • To reduce forks by reusing existing processes for new requests increase service { service_count } from 1 to higher (e.g. 100) for imap and pop3 services. It’s better not to set it too high or unlimited (0), because different users use different amounts of memory, and it’s wasteful when a lot of processes end up having a lot of “free” memory.

Memory usage optimization

There aren’t many settings which affect Dovecot’s memory usage. In general Dovecot uses as much memory as it needs, which is usually quite little.

Note that these settings do not directly affect the memory usage: