I'm running a mail server for about 200 users with courier-imap on Debian 7. This server is running a linux kernel 2.6.38 inside a Xen guest having 2 cpu cores and 2 GB RAM. The server accept incoming mail through postfix, but resources intensive checks (amavis, spamassassin) are delegated to another server.
Lately I'm running into IMAP performance issues with client connections being dropped randomly. The load on the server is not low, but it is also not that high, even at times when those connection drops are happening. At peak times, I have about 120 simultaneous imap clients and 5 min load is < 1.
I've noticed the connection drops appear at the same time as the following log lines on my server:
imapd: FAMPending: timeout
I guess that when FAM is timing out, the imap server returns some kind of error and, depending on the client, the error is dealt with gracefully or not (some webmail clients do not like that).
The regular Debian courier-imap
package requires a fam implementation, I have the choice of using famd
or gamin
. I've tried both and both are running into those timeouts. It seems to me gamin produces a lower load on the server, but still timeouts are occurring.
I'm wondering if there is anything I can tune to improve the fam/gamin performance and to avoid the timeout messages. There is not much to configure in the daemons. However, could it be that I'm running out of file descriptors or inotify resources? How could I check that?
Or do you think a better choice would be to upgrade my Xen guest or to move away from courier-imap?
0 Answers