From owner-freebsd-hackers Thu May 16 1: 2:15 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from clifford.inch.com (ns.biglist.com [216.223.208.40]) by hub.freebsd.org (Postfix) with SMTP id 9B62137B416 for ; Thu, 16 May 2002 01:02:04 -0700 (PDT) Received: (qmail 60647 invoked by uid 501); 16 May 2002 08:02:03 -0000 Date: Thu, 16 May 2002 04:02:03 -0400 From: Omar Thameen To: Doug White Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: tuning a CPU bound server Message-ID: <20020516040203.A84284@clifford.inch.com> References: <20020515032425.A23491@clifford.inch.com> <20020515144802.F869-100000@resnet.uoregon.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020515144802.F869-100000@resnet.uoregon.edu>; from dwhite@resnet.uoregon.edu on Wed, May 15, 2002 at 02:53:49PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, May 15, 2002 at 02:53:49PM -0700, Doug White wrote: > On Wed, 15 May 2002, Omar Thameen wrote: > > Can you post a netstat -m from now? It will have the peak values in it. 1484/2016/34816 mbufs in use (current/peak/max): 914 mbufs allocated to data 64 mbufs allocated to packet headers 506 mbufs allocated to socket names and addresses 247/952/8704 mbuf clusters in use (current/peak/max) 2408 Kbytes allocated to network (9% of mb_map in use) 0 requests for memory denied 0 requests for memory delayed 0 calls to protocol drain routines > > I've grown to this concurrencyremote fairly gradually. There was > > You've hit the limits of what the system can fork off. The solution then > is to reduce the amount of forking going on. > > Make sure any alias files or whatever gets commonly hit on your machine > avoid calling shells at all costs. Shells take a long time to start up > and are slow which will slow down your throughput. It's easy to > accidentally trigger shell starts if you use metacharacters in your alias > files. If your mail processor can be called directly, try to arrange it > so it is instead of going through an intermediary shell. Ok, I'll have a good look through. This is mostly an ezmlm installation, so I don't think there are too many spurious shells being forked, but local modifications might have introduced some. > > It's dnscache (~30%), then the 2 qmail-rspawn processes (~20-25% each). > > I don't know much about dnscache and its characteristics, but that might > be somewhere to concentrate on to get a few % cpu back. The rspawns sound > about right from my experience. Moving it to a separate box, if useful, > might be a good idea, at least to try. I'll try that, but with the number of hits dnscache takes, I think I'll need another server. BTW, qmail-send does run up the CPU, but only for short periods ( < 1-2 minutes ) while the recipient list is built. > Running two qmail instances on the same machine is probably hurting each > other, so you might want to collapse them back into one. I'll give that a shot, with an increased concurrencyremote. My thanks to both you and Terry for all the insight and suggestions. If there's any additional data from this server which might be of interest to you or anyone, please let me know. Omar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message