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.
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:
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