From owner-freebsd-hackers Wed Apr 2 07:56:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA06299 for hackers-outgoing; Wed, 2 Apr 1997 07:56:08 -0800 (PST) Received: from tor-adm1.nbc.netcom.ca (taob@tor-adm1.nbc.netcom.ca [207.181.89.5]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA06262 for ; Wed, 2 Apr 1997 07:56:02 -0800 (PST) Received: from localhost (taob@localhost) by tor-adm1.nbc.netcom.ca (8.8.5/8.8.5) with SMTP id KAA05494; Wed, 2 Apr 1997 10:54:47 -0500 (EST) Date: Wed, 2 Apr 1997 10:54:47 -0500 (EST) From: Brian Tao To: keith waters cc: freebsd-hackers@freebsd.org Subject: Re: Unreasonable rebuild time on large password files In-Reply-To: <199704020913.LAA03056@ilink.nis.za> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 2 Apr 1997, keith waters wrote: > > This must be one of the worst cases of code/resourse optimisation, > since changing a password means rebuilding EVERY SINGLE entry in the > password databases. We await your optimized code diffs to pwd_mkdb(8) then. :) > Does anybody out there have a working solution ? Please! In the meantime, look through the pwd_mkdb source and increase the default hash table size (it is fixed at 2MB, IIRC). Increase this as necessary to minimize disk thrashing. The time needed to rebuild the databases is almost inversely proportional to the amount of memory you allow pwd_mkdb to allocate, up to a point. -- Brian Tao (BT300, taob@netcom.ca) "Though this be madness, yet there is method in't"