Improving Disk I/O and Overall Performance for your Mail Server, Part 1

While SmarterMail 11.x has a significant number of changes that greatly increase the performance and reliability of your mail server, there are still some configuration tweaks that mail admins can use to further increase performance. In this three part series (there's a LOT to discuss) we'll look at a few things you can do to increase the overall lperformance of your mail server beyond simply using SmarterMail. Part One will cover general server settings, Part Two will cover SmarterMail and Part Three will cover tweaks to email clients and devices as well as hardware changes to increase performance.

It doesn't even matter if you're running SmarterMail - any mail server will benefit from the various hardware, software and end-user/device mods mentioned. If you're doing some of these already, then you're ahead of the curve. However, read through and see if you can grab one or two more that allow you to squeeze the most out of your mail server performance.

Mail Server Settings

There are some changes that can be made to how your mail server is set up as well as some file system changes that can help increase performance. Below are a few ideas to get you started.

Use Robust Anti-virus

Use of good, robust antivirus software can help keep your mail server running smoothly by..well, scanning for, and removing, potential viruses that can come into your system via email. Antivirus software should be configured to scan messages as well as attachments, though care should be taken when designating where, and how often, some sections of your mail server are actively protected. See the next point, as an example. SmarterMail comes with ClamAV, an open-source anti-virus software, that can be configured when the mail server is set up, free of charge.

Limit the Resident Shield (or Similar) Component

Many anti-virus applications have a component that runs in the background that scans every single file that is copied to, saved to or even opened on the mail server. While these components allow system administrators to keep their mail servers virus-free, on heavily-used mail servers this can be a real drain on system resources. Therefore, it's best to limit the resident shield component to only those locations that will most benefit by setting up exceptions in your anti-virus administration area.

Limit Where and What Is Scanned by A/V

In addition, you'll only want to scan messages that come into the spool, and if possible, only scan writes and remove scans of disk reads. Disk i/o and CPU can be heavily taxed when scanning mailboxes over and over and over again. While you can run periodic checks on the server as a whole, maintaining the spool is the best way to ensure your mail server is virus-free as the only way a file can get to a mailbox is when it is written to the spool or to working/temp directories. Therefore, scanning writes only is a great way to keep your mail server virus free. Some may see this as a possible decrease in overall server security, but it will result in dramatic improvements to overall disk i/o and utilization.

Disable Pagefile

Opinions on the advantages of disabling the Windows pagefile vary: some say you should keep it "just in case" while others say that modern applications will never need it, so why keep it? Besides, most businesses run servers with more than enough RAM to compensate for any potential benefits that the pagefile represents. Therefore, you may as well disable your pagefile. The only time it's beneficial is if you're running a mail server with 4GB of RAM or less - and, to be honest, why would you do that?

Disable IIS Logging for the Webmail interface

Any Web hosting provider offering Windows hosting can attest to how IIS log files can grow..and grow...and grow. That's great for customers'' sites, but it's not something you necessarily want to have happen to the SmarterMail Web interface. There's enough reporting within SmarterMail for end users and administrators that seeing views, visits and hits isn't necessary. Therefore, when you set up SmarterMail as a site in IIS (which is highly recommended in our system requirements), it's a good idea to simply disable IIS logging for that site. Use the reports within SmarterMail versus using the IIS logs to generate reports.

A Few Other Items

There are a few other things that can be done to help optimize your mail server. These are pretty self-explanatory, so we'll just bullet point them:

  • Disable hibernation or sleep for your server
  • Disable Windows Indexing as this reduces overall disk i/o and extends SSD life
  • Make sure write caching is enabled
  • Disable defrag for your spool, especially if you're using a SSD
  • Defrag RAID arrays at least every couple of days, but do it off hours if possible
  • Do NOT use a realtime defragger - only use the one within Windows itself
  • Don't defrag while backing up your mail server

There you have it. A few tips to help maximize the performance of your mail server. In Part Two, we'll discuss some settings for SmarterMail itself, though these tweaks can possibly be made to any mail server, so stay tuned!