From owner-freebsd-stable@FreeBSD.ORG Wed Apr 27 19:06:49 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0B6A16A4CE for ; Wed, 27 Apr 2005 19:06:49 +0000 (GMT) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B73743D54 for ; Wed, 27 Apr 2005 19:06:49 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from ury.york.ac.uk (ury.york.ac.uk [144.32.108.81]) by mail-gw0.york.ac.uk (8.12.10/8.12.10) with ESMTP id j3RJ6c31017556; Wed, 27 Apr 2005 20:06:38 +0100 (BST) Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.12.9p2/8.12.9) with ESMTP id j3RJ6ciJ047290; Wed, 27 Apr 2005 20:06:38 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from localhost (gavin@localhost)j3RJ6cXd047287; Wed, 27 Apr 2005 20:06:38 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Wed, 27 Apr 2005 20:06:38 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Oliver Brandmueller In-Reply-To: <1114625632.21968.34.camel@buffy.york.ac.uk> Message-ID: <20050427200324.X47179@ury.york.ac.uk> References: <20050425105919.GA95908@e-Gitt.NET> <1114625632.21968.34.camel@buffy.york.ac.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin.atkinson@ury.york.ac.uk cc: freebsd-stable@freebsd.org Subject: Re: nss_ldap / top startup X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2005 19:06:50 -0000 On Wed, 27 Apr 2005, Gavin Atkinson wrote: > On Mon, 2005-04-25 at 12:59 +0200, Oliver Brandmueller wrote: > > The more accounts there are in the LDAP directory, the longer the > > startup of "top" takes. With the current userbase top takes about 3-4 > > seconds to start (on a mostly idle Dual Xeon 2.8GHz with fast disks and > > local slapd). > > The problem is in machine.c - it iterates over every user in the passwd > file to figure out what how many characters longest username may be. > It's nasty and to be honest I think it can/should just be removed. > > Try the attached patch just to prove that this is the cause in your case > too. Sorry - even with that patch, I suspect you'll have to either run top with the -u option, or define RANDOM_PW before recompiling it. If you can, try both individually, I'd be interested in your finding. Gavin