Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Aug 2007 10:54:01 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        Zbigniew Szalbot <zbigniew@szalbot.homedns.org>
Cc:        Freebsd questions <freebsd-questions@freebsd.org>
Subject:   Re: getting fair share of CPU for processes
Message-ID:  <20070802105401.06b4e31a.wmoran@potentialtech.com>
In-Reply-To: <22385127afb407e66e0bc0c1c0931337@szalbot.homedns.org>
References:  <22385127afb407e66e0bc0c1c0931337@szalbot.homedns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In response to Zbigniew Szalbot <zbigniew@szalbot.homedns.org>:
> 
> I am looking for advice but maybe this question really belongs to
> spamassassin user list. Anyway, by observing load on my FreeBSD machine I
> have found that at certain times it gets really high (between 14-17). When
> I get such load my machine is quite busy sending thousands of emails. This
> in itself is OK because load is rarely over 1 but then I get a few more
> incoming emails and spamd, while checking them, bumps up the load to 14 or
> more. Such increased load usually does not take longer than 1-2 minutes.
> And I have configured exim to ease up on its work when the load gets so
> high (first it tempfails incoming messages, then when situation becomes
> worse it only queues outgoing ones).
> 
> So I am wondering it it is OK for me to limit the spamd user to how much
> CPU power it can get? I saw in the Handbook that it is possible to limit
> resources per user. Do you think it is a good thing to do? Will I be better
> off limiting spamd user or will it make the situation worse because SA
> will/may choke? Many thanks for any advice you can give me. I really
> appreciate it!

The most typical method of handling this would be nice(1) (see the man
page for details).

But, depending on your setup, improper use of niced spamassassin processes
could make the problem worse.  You have a lot of dependencies within
the mail flow, and issues such as priority inversion could occur in
ways that aren't immediately obvious.

Also, I'm not clear as to what problem you're tyring to solve.  High load
on a busy server certainly isn't a problem, so where is the problem?

If your server is consistently overloaded, then the correct solution is
to either streamline your configuration so it's less resource intensive,
or add hardware.

-- 
Bill Moran
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070802105401.06b4e31a.wmoran>