Your IP Address is:

Next Fedora Release

Cyrus-imapd i/o performance (100x speedup)

Yesterday I experienced some serious performance problems with Cyrus-imapd.

My INBOX contains about 2500 messages, and accessing it through Squirrelmail took my browser about ~120 seconds to display the overview page.

I found out that performance problem was caused by the imapd process which was causing a lot of iowait. The iowait was caused by a lot of small write actions.

Half a year earlier I also experienced this problem. I found out that imapd accesses al the emails (files) in my inbox, causing Ext3 to update the atime of each file and directory. This causes the filesystem to do a write action for every read action on the filesystem.
As a solution I created a separate logical volume for my /var/spool/imap, formatted it, rsynced the content to the new filesystem and changed the mount options to “rw, noatime, nodiratime” in /etc/fstab.

This made imapd significantly faster. The loading of my INBOX changed from ~120 seconds to ~1.2 seconds. That’s about 100x faster!

Yesterday I found out that the performance problem was back.
I found out that (for some unknown reason) the Ext4 filesystem was not using the noatime and nodiratime mount options in /etc/fstab.

I migrated the /var/spool/imap volume from Ext4 to Ext3, and updated the line in  /etc/fstab to Ext3.

This made my performance problem go away, and my INBOX is now loaded in ~1.2 seconds again!

Technical info:
cyrus-imapd: 2.3.16-6.fc14.x86_64

Comments are closed.