Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 1996 19:41:43 -0800 (PST)
From:      "JULIAN Elischer" <julian@ref.tfs.com>
To:        rashid@rk.ios.com (Rashid  Karimov)
Cc:        hackers@freebsd.org
Subject:   Re: pwd_mkdb - really slow :(
Message-ID:  <199603040341.TAA27629@ref.tfs.com>
In-Reply-To: <199603040253.VAA07580@rk.ios.com> from "Rashid  Karimov" at Mar 3, 96 09:53:17 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 		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.
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603040341.TAA27629>