5

I just deployed postfix, saslauthd, courier to a starter VPS box running Ubuntu 8.04 with with 512MB of memory. Most of the memory is now being eaten up by these processes.

I do plan to upgrade to a plan with more RAM and eventually switch dedicated hardware. But in the meantime can anybody point me to some resources to help me tune the configuration.

3 Answers 3

5

There aren't really many tunables in courier - you can tune the underlying machine, not the software itself.

That being said, there are some things you can do to improve performance:

  1. More RAM. I know you're planning to do that and I know it's not what you want to hear, but it's the single best bet on improving performance - both by allowing courier to keep more connections open (IMAP takes 512K up to 2M per connected client), and by allowing a bigger file system cache. Go 64-bit if possible and throw 8 or 16 GB at the mail server. RAM is cheap. Time is not.

  2. Make sure you've mounted the file system hosting your maildirs with the noatime option. That supposedly interferes with the mutt mail client but in my experience has never, ever caused any problem. If you really must and run a newer kernel, you can use relatime - but noatime improves performance a lot.

  3. Pick a good file system. ext3 will sooner rather than later show its limitations (abysmal performance with many files in the same directory, constant stalling due to fsync, etc.) I've used XFS for years (can't get people to archive their mails in subfolders and I've found XFS to be the only file system that's both able to easily handle tens of thousands of files in a directory and not prone to horrific slowdown over time (yes, ReiserFS, I'm looking at you.)

  4. If you're using IMAP, limit the number of cached connection in your IMAP client configuration (in Thunderbird, you'll find that under Account Settings -> desired account -> Server Settings -> click on the Advanced button on the right -> set Maximum number of server connections to cache to 1 or 2, or at least something saner than the default 5.

  5. If you're using IMAP through some webmail system or the other, please consider installing an IMAP proxy, otherwise you'll cause constant re-logins due to the nature of web applications. A package compatible with Courier is up-imapproxy.

2
  • Thanks for the detailed response. More RAM is definitely a route I will be taking. I was looking for other options because my provider's sales department is closed for a the bank holiday weekend in Ireland. May 3, 2009 at 13:31
  • Sorry, no magic bullets :( May 3, 2009 at 15:54
2

The following will get you started on tuning Postfix, unfortunately, I wasn't able to find any real good documentation on SaslAuthD or Courier.

Postfix Performance Tuning: http://www.postfix.org/TUNING_README.html

2

I haven't run courier for a long time but it might be worth looking at dovecot, which I find to be quite lightweight for a POP3 & IMAP server.

Not the answer you're looking for? Browse other questions tagged .