1

We have a mail server built on top of a Gluster distributed filesystem. While this has proven to be fairly easy to set up and quite stable, the performance of our webmail has been quite slow. So now I get to tune the performance of the underlying filesystem (which is almost certainly the cause of the slowness - it was lightning quick when we had our mail stored on the local filesystem).

The problem starts with the fact that I have no idea how to actually measure how fast IMAP retrieves individual messages. Without this metric, I can't determine which tuning variables are helping us. Moreover, it seems that caching doesn't work with IMAP. If I try to retrieve the same message again, it takes at least as long as the first time. Using the ls or du command on the filesystem itself does cache the results, and subsequent requests are much faster than the first. So timing these results wouldn't be able to help me much.

Any help would be appreciated.

Ernie
  • 5,352
  • 6
  • 31
  • 37
  • This depends on a lot of variables... your hardware setup, the filesystems in use, even the mail software being used. Can you provide some details? – ewwhite Apr 21 '16 at 23:21
  • Yes, but I just want to measure those variables, and how they affect performance. As far as I know, you can't use the unix `time` command with `telnet localhost 143`. – Ernie Apr 22 '16 at 16:03

1 Answers1

0

If you want to measure the performance of your IMAP server then your best best is to find or build an IMAP benchmark tool. Load a bunch of messages and then run a suite of tests against one or more user accounts. For example:

  1. Login to the IMAP server
  2. Select a mailbox
  3. FETCH the headers for the messages
  4. FETCH a number of messages
  5. APPEND some messages to the mailbox
  6. Mark some of them for deletion or as seen, forwarded, answered, etc
  7. Expunge the mailbox
  8. Log out

Time each individual operation so you can identify hot spots. And the closer you model the tests you run to what your users do the better. For example, if your workload leans heavily toward message fetching and not so much toward storing new messages then your test suite should reflect that.

You may be able to find an existing tool but if not, there are a number of good IMAP APIs. Choose a language you like, pick an API, and build yourself a tool.

-Rick

Rick Sanders
  • 106
  • 1
  • 1
  • 1
    Hehe. I think you missed a final step: release the tool on the internet for other people to use, because it seems that nobody else has. ;) – Ernie Apr 25 '16 at 20:04