Date: Wed, 5 Jan 2005 12:56:42 -0500 From: Bruce Campbell <bruce@engmail.uwaterloo.ca> To: freebsd-questions@freebsd.org Subject: Re: New FreeBSD 5.3 e-mail server extremely slow - traced to getpwnam maybe ? Message-ID: <1104947802.41dc2a5aa6c62@www.nexusmail.uwaterloo.ca> In-Reply-To: <1104941302.41dc10f6a1e9b@www.nexusmail.uwaterloo.ca> 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> <1104941302.41dc10f6a1e9b@www.nexusmail.uwaterloo.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Bruce Campbell <bruce@engmail.uwaterloo.ca>: > Quoting Bruce Campbell <bruce@engmail.uwaterloo.ca>: > > > On Tue, Jan 04, 2005 at 09:27:27PM -0500, Bruce Campbell wrote: > > > > > > > I wrote a small program: > > > > > > > > #include <sys/types.h> > > > > #include <pwd.h> > > > > > > > > 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 ? Well, somewhat unbelievably, copying a getpwent.c from 4.7 and remaking libc on 5.3 with it worked. Load average has gone from 70 to 2. And, so that this qualifies as a question... Am I crazy to pull an old getpwnam from 4.7 and blindly build it on 5.3 ? -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1104947802.41dc2a5aa6c62>