From owner-freebsd-questions@FreeBSD.ORG Wed Jan 5 02:27:23 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 5155F16A4CE for ; Wed, 5 Jan 2005 02:27:23 +0000 (GMT) Received: from ecserv7.uwaterloo.ca (ecserv7.uwaterloo.ca [129.97.50.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7F2C43D5C for ; Wed, 5 Jan 2005 02:27:22 +0000 (GMT) (envelope-from bruce@engmail.uwaterloo.ca) Received: from ecserv7.uwaterloo.ca (localhost.uwaterloo.ca [127.0.0.1]) j052RRAG042022; Tue, 4 Jan 2005 21:27:27 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) Received: (from www@localhost) by ecserv7.uwaterloo.ca (8.12.10/8.12.10/Submit) id j052RRxg042021; Tue, 4 Jan 2005 21:27:27 -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 65.93.198.45 ( [65.93.198.45])HTTP; Tue, 4 Jan 2005 21:27:27 -0500 Message-ID: <1104892047.41db508f4c7f4@www.nexusmail.uwaterloo.ca> Date: Tue, 4 Jan 2005 21:27:27 -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> In-Reply-To: <20050104221531.GA70844@xor.obsecurity.org> 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: 65.93.198.45 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 02:27:23 -0000 Quoting Kris Kennaway : >> > Well, no, not quite. > > > > old: imap-uw-2002_1,1 > > new: imap-uw-2004a,1 > > OK, that's where you should start, then. Go back to the software > configuration that you know is working and see if it still misbehaves. > > Kris Thanks. I shutdown imapd/ipop3d completely so I just had sendmail running, and still load av. was 20-30. Anyways, I have just found something very odd with both 5.2.1 and 5.3 on multiple different systems here, including a brand new GENERIC install. On 5.x, "ls -l" or "ps waux" is very slow with our /etc/master.passwd which has 11320 entries. I truss'ed those commands, and gave up after watching : lseek(4,0x17d000,SEEK_SET) = 1560576 (0x17d000) read(0x4,0x8074000,0x1000) = 4096 (0x1000) lseek(4,0x17e000,SEEK_SET) = 1564672 (0x17e000) read(0x4,0x8062000,0x1000) = 4096 (0x1000) lseek(4,0x17f000,SEEK_SET) = 1568768 (0x17f000) read(0x4,0x8066000,0x1000) = 4096 (0x1000) lseek(4,0x180000,SEEK_SET) = 1572864 (0x180000) scroll by for 10 minutes. (handle 4 = /etc/spwd.db) 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) 4.7 (with same master.passwd file) gave 59 lines of output, which seems normal. I'm speculating that imap and sendmail and just about everything use getpwuid and getpwuid is misbehaving on 5.x especially with a large master.passwd file. I will report this through the proper mechanism once I do just a bit more testing. And perhaps it is a known issue already and I'll look into that also. Or perhaps I have messed something up unwittingly, which I have been known to do. We do have an extremely busy 5.2.1 system running here fine on the same hardware, just it has a small /etc/master.passwd which may explain that systems success to date. Thank you to everyone who sent suggestions. -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca