From owner-freebsd-questions@FreeBSD.ORG Wed Jan 5 16:08:21 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2F4C16A4CE for ; Wed, 5 Jan 2005 16:08:21 +0000 (GMT) Received: from ecserv7.uwaterloo.ca (ecserv7.uwaterloo.ca [129.97.50.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5997843D39 for ; Wed, 5 Jan 2005 16:08:21 +0000 (GMT) (envelope-from bruce@engmail.uwaterloo.ca) Received: from ecserv7.uwaterloo.ca (localhost.uwaterloo.ca [127.0.0.1]) j05G8MAG070973; Wed, 5 Jan 2005 11:08:22 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) Received: (from www@localhost) by ecserv7.uwaterloo.ca (8.12.10/8.12.10/Submit) id j05G8MPF070972; Wed, 5 Jan 2005 11:08:22 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) X-Authentication-Warning: ecserv7.uwaterloo.ca: www set sender to bruce@engmail.uwaterloo.ca using -f Received: from 129.97.50.50 ( [129.97.50.50])HTTP; Wed, 5 Jan 2005 11:08:22 -0500 Message-ID: <1104941302.41dc10f6a1e9b@www.nexusmail.uwaterloo.ca> Date: Wed, 5 Jan 2005 11:08:22 -0500 From: Bruce Campbell To: freebsd-questions@freebsd.org References: <1104860328.41dad4a8ebd90@www.nexusmail.uwaterloo.ca> <20050104205922.GD13991@xor.obsecurity.org> <1104875116.41db0e6c7fbf3@www.nexusmail.uwaterloo.ca> <20050104221531.GA70844@xor.obsecurity.org> <1104892047.41db508f4c7f4@www.nexusmail.uwaterloo.ca> <20050105045329.GA77072@xor.obsecurity.org> <1104932867.41dbf003405b1@www.nexusmail.uwaterloo.ca> In-Reply-To: <1104932867.41dbf003405b1@www.nexusmail.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 / FreeBSD-4.6.2 X-Originating-IP: 129.97.50.50 Subject: Re: New FreeBSD 5.3 e-mail server extremely slow - traced to getpwnam maybe ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2005 16:08:21 -0000 Quoting Bruce Campbell : > > On Tue, Jan 04, 2005 at 09:27:27PM -0500, Bruce Campbell wrote: > > > > > I wrote a small program: > > > > > > #include > > > #include > > > > > > main( int argc, char *argv[] ) > > > { > > > getpwuid( 13076 ); > > > } > > > > > > and ran it under truss on 5.x and it generated 178,711 lines of output. > > > (the bulk of which is those lseek/read calls as above) It looks like the overhaul of getpwent Apr/2003 to make it thread safe: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/getpwent.c may be the problem. I've tested the dbm_fetch function independently on a large file, and it is fine. I've opened a bug report, and plan to build a replacement 4.x mail server, as the most deterministic path to restoring adequate e-mail service to our users. Can anyone suggest a workaround ? -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca