[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: load average question



On Sat, Nov 23, 2002 at 08:40:20AM +0100, Russell Coker wrote:
> On Fri, 22 Nov 2002 23:51, Scott St. John wrote:
> > A few weeks ago we talked about me moving a server from BSDi to
> > Debian.  As luck would have it that BSDi server gave out last Monday
> > and I had to move fast to replace it.  Knowing I can do a RH install
> > in about 30 minutes I went the route of familiar territory and
> > installed 7.2 with Sendmail/QPopper/Apache/OpenWebMail.  I am paying
> > for that now with a huge performance problem.  I am seeing Load
> > Averages spiking above 6 during the day.  Hardware is a Dual P3-600
> > with a gig of ram on a IBM Netfinity Raid 5 controller.
> >
> > The owner of the company wants to go back to BSD, but I want to
> > pursue Debian. So the question is:  is anyone running a similar set
> > up with either Sendmail or Posrtfix servicing 2,000+ email accounts
> > with any performance issues?
>
> Apart from webmail that should be a trivial load.  Webmail systems
> seem to take up lots of resources in my experience, is it an option to
> have a separate machine for webmail?

that machine should have no problems handling that number of users.  in
fact, it's overkill for the job - which is OK, it doesn't hurt to have a
faster machine than you need :)

the biggest load would be, as russell says, the webmail.  fortunately,
you can do a lot to optimise the current setup.

some suggestions:

1. use Maildir rather than mbox if your users are in the habit of
leaving large mailboxes on the server.

you're currently using qpopper, which IIRC copies each mailbox to /tmp
each time it is accessed.  that's bad, very bad - webmail access via pop
means every web-page fetch is causing that to happen. this is almost
certainly the cause of all your load problems.

if you change to Maildir, you'll have to change your pop & imap daemons
to Maildir compatible ones....which brings us to:

2. replace qpopper with something a bit nicer to your disks.  e.g.
cucipop if you want to stay with mbox format for a minimal and very easy
change. 

or switch to Maildir and install courier-{maildrop,imap,pop} for best
performance.

3. one more thing that will probably reduce the load immediately, even
under your current RH setup is to configure syslog so that mail.log is
written async - i.e. your syslog.conf should say "-/var/log/mail.log"
rather than "/var/log/mail.log".  

4.  also, switch to postfix rather than sendmail.


other semi-random comments:

a nice setup is debian, postfix, courier-maildrop, courier pop & imap,
and maybe courier's sqwebmail (although you may want to stick with
openwebmail as it is a better webmail program).  the only advantage of
sqwebmail is that it interacts with the Maildir files directly, rather
than through imap - this is either an advantage or a disadvantage,
depending on how you want to look at it :)

personally, i don't think it's possible to build a better mail server
than that (debian, postfix, courier etc).  you've already got good
hardware and with that software combination, you'd have best-of-breed
software to match....and it's done entirely with Free Software too.


doing items 1-4 above will probably get the load down enough that your
mgmt may be willing to continue with the linux experiment.

probably the easiest way to do all this is to just rebuild the machine
as a debian box and install the debian packages.



finally, if you use Maildir, i'd recommend using XFS or reiserfs as the
file-system.  ext2 performance really sucks when you have a few
thousands files in one directory, but both XFS and reiserfs handle that
without a problem.

personally, i'd use XFS or reiserfs in preference to ext2 or ext3
anyway.


good luck.

craig

-- 
craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch



Reply to: