From owner-freebsd-questions@FreeBSD.ORG Thu Aug 2 14:54:03 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6521D16A417 for ; Thu, 2 Aug 2007 14:54:03 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id 287C413C468 for ; Thu, 2 Aug 2007 14:54:02 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.pitbpa0.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTP id CDAE1EBC81; Thu, 2 Aug 2007 10:54:01 -0400 (EDT) Date: Thu, 2 Aug 2007 10:54:01 -0400 From: Bill Moran To: Zbigniew Szalbot Message-Id: <20070802105401.06b4e31a.wmoran@potentialtech.com> In-Reply-To: <22385127afb407e66e0bc0c1c0931337@szalbot.homedns.org> References: <22385127afb407e66e0bc0c1c0931337@szalbot.homedns.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Freebsd questions Subject: Re: getting fair share of CPU for processes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2007 14:54:03 -0000 In response to Zbigniew Szalbot : > > 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