fam and gamin


Earlier this evening I resolved to finally hunt down the source of some thundirbird timeouts. The mail client would periodically timeout when getting mail. It would do this from the local network. Now my mailbox is in no way small. The mailing lists I subscribe to see to that. My mailserver is using reiserfs and maildir, so I was pretty sure it wasn't a filesystem related issue. In addition, the server is running on a set of hardware raid5 drives which rules out a disk speed issue.

While watching the mail logfile, I noticed the following error: imapd-ssl: FAMPending: timeout which led me to the enhanced idle support found in courier-imapd. When there isn't any activity at the mail client, it will enter an idle state and be sent mail reciept notifications. It's supposed to be much better than polling. After looking at the famd stuff, I came upon gamin. Gamin is a replacement for fam, that does not provide the full fam featureset or run as a system-wide daemon. Both of those changes are positive, fam was designed to handle more cases than I need or want. As far as the lack of a system-wide daemon goes, its a security plus. Gamin spawns a daemon as the calling user (its implemented as a library). After unmerging famd and installing gamin, imap interaction is much peppier.