From owner-freebsd-hackers Sun Mar 3 19:43:21 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA29692 for hackers-outgoing; Sun, 3 Mar 1996 19:43:21 -0800 (PST) Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id TAA29679 for ; Sun, 3 Mar 1996 19:43:17 -0800 (PST) Received: (from julian@localhost) by ref.tfs.com (8.7.3/8.6.9) id TAA27629; Sun, 3 Mar 1996 19:41:43 -0800 (PST) Message-Id: <199603040341.TAA27629@ref.tfs.com> Subject: Re: pwd_mkdb - really slow :( To: rashid@rk.ios.com (Rashid Karimov) Date: Sun, 3 Mar 1996 19:41:43 -0800 (PST) From: "JULIAN Elischer" Cc: hackers@freebsd.org In-Reply-To: <199603040253.VAA07580@rk.ios.com> from "Rashid Karimov" at Mar 3, 96 09:53:17 pm X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk > > HI there ppl, > > As I understand it, changes were made to do single-point changes, and to speed all this up in the 'passwd' case. to speed up mkpwd you would need a 'diff' file of before and after' and do the changes as a set of single-point changes. This requires that you trust the passwd.master and the database files to be correctly in sync. > > > I have quite afew systems here with ~10.00 accounts > on ea ... and pwd_mkdb is _very slow now ... Takes > 2+ minutes to rebuild the damn databases every time. > > I'm not concerned with passwd command , even though > as I understand it doesn;t do one-point update so far > and rebuilds everything from a scratch, but I'm trying > to somehow speed up the pwd_mkdb itself. > > So they're a few ways I can see looking at the source code . > For example it does two passes on a master password file > it's fed as a parameter - once for unsecure and once > for secure databases - so this could be made only once > and we can write in to db's in parallel, Secondly may > be I'll be able to reuse at least parts of the structure > used for db->put for secure and usecure db's. > And aslo - does any of programs actually use pwd info > indexed by line number ? Do we really need this pass > ( there're actually two passes) ? > > I want to check the the thing using profiler , just > to see what eats most time in the program ( I do have > a feeling already that it's all those dp->put's ). these might of course speed things up.. it might also be quicker to build the entire databse in ram and bang it out to disk as a single write.. :) > > > Rashid. >