
On Tue, Jan 19, 2016 at 12:59:09PM +1100, Russell Coker wrote:
On Tue, 19 Jan 2016 12:22:31 PM Craig Sanders via luv-main wrote:
On Tue, Jan 19, 2016 at 10:12:12AM +1000, Piers Rowan wrote:
- dovecot - apache (roundcube webmail) - sendmail
unless you're a sendmail expert with a decade or two of experience working with it, you might want to think about switching to postfix.
While Sendmail is generally a bad choice, it seems unlikely that it is contributing to the disk IO performance here.
probably not. but there's no good reason to use it these days unless you know it extremely well. there are better options that are easier and saner to configure (postfix and exim for starters). postfix's an almost drop-in replacement for sendmail, so it's an easy conversion - IIRC some of the map tables (like the virtual table ) have a slighly different format. OTOH, last time i used sendmail (admittedly over 10 years ago) it suffered from a massive thundering herd problem....too much inbound *or* outbound mail or both at once and the system would slow to a crawl and eventually crash (due mostly to running out of memory) because it tried to send/receive/process it all at once. no amount of tuning would help. postfix's queue management was vastly superior....just switching to postfix on the exact same server (IIRC, a pentium pro with something like 64MB or 256MB running a mailing list with a few hundred thousand subscribers - so a lot of mail to send out, and a lot of incoming bounces) caused it to stop crashing under the load and deliver all the mail in about 1/10th of the time.
One thing that can be done to improve performance on the MTA side is to use Dovecot's delivery agent instead of having the MTA deliver directly or use Procmail or similar. If Dovecot delivers directly it will index the mail while delivering it which will save tim later.
yep.
so you're regularly importing mail into a database of some sort?
that may be the source of your problem - dovecot will be contending with mysql for disk I/O unless the mysql db and the mail spool are on different disks (ideally, two separate SSDs. or two separate RAID-1 devices on SSD)
I find it difficult to imagin a mail service of that nature which needs performance that is greater than a pair of SSDs in a RAID-1 can provide.
i meant one SSD or RAID-1 pair for mail, and another for mysql. they're the two big disk I/O hogs, so moving them onto separate disks is going to be a huge win for performance. RAID-1 is a bonus, but just having them on separate SSDs would help enormously. and with only one disk for each, you can create them as degraded RAID-1 (i.e. RAID-1 without a mirror disk - Linux mdadm supports this, without any problem) so it's easy to add a 2nd drive to each later if buying four drives at once stretches the budget too far.
I think we're talking about a mail server for a small company not hotmail.
that's my impression too. craig -- craig sanders <cas@taz.net.au>