Subject: Re: pwd_mkdb - Lets do this differently!
To: None <firstname.lastname@example.org>
From: Stephen M Jones <email@example.com>
Date: 08/09/2001 04:11:56
Thanks to Takahiro again. He sent a PR two years ago to patch a current
(Jan 19th 1999?) pwd_mkdb, chpass and local_passwd .. basically adding
the -u functionality we've seen in FreeBSD. Unfortunately his patches
didn't make it into the source tree and since then pwd_mkdb has been
'cleaned up'. The diffs are available in the archives and I've not
tried to hand patch any files yet. It won't apply to 1.3.2 or 1.4.0
But, his recent post tipped me off to revisit pwd_mkdb's HASHINFO
parameters. I've got 1024mbs in the machine, and since the
pwd.db and spwd.db files are roughly 10-12 mbs (depending on the
other parameters at this time), I though I'd offer it a 32mb cache
and see if that would help.
Well, I went from 4-5 minute pwd.db spwd.db builds to 19-24 second
builds. Which is a really great improvement. It took just alot of
frobguesswork on the parameters for the hash table .. being careful
not to overrun buckets. I admit I was rather arbitrarily guesshacking
at it and just experimenting based on what the hash manpage had to
say. Mind you these parameters might have to be tuned depending on
how the passwd file grows.
and this is on an unloaded machine .. essentially idle.
pwd.db and spwd.db are roughly 10mb each now .. would using btree
help? .. obviously IO/faster disk would be OKay .. or gee, what
about MFS for the .db files? just generate them at boot.