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.

Brian Matthews
  • 151
  • 2
  • 3

3 Answers3

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.

Mihai Limbăşan
  • 3,071
  • 22
  • 19
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

Jordan S. Jones
  • 1,083
  • 9
  • 13
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.

Timo Geusch
  • 458
  • 1
  • 4
  • 9