Subject: Re: Making file-based getXent quicker
To: Darren Reed <darrenr@NetBSD.org>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-userlevel
Date: 03/20/2006 10:42:35
--4MRJAMMELAbUsYLE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Mar 19, 2006 at 08:41:14PM +0000, Darren Reed wrote:
|=20
| In a discussion about how NetBSD opens and closes nls files way too
| often, it was brought up that there are similar problems with the
| name-number files like /etc/services and /etc/protocols.
|=20
| So the problem is, what to do about it? How can they be made quicker?
Have you profiled that these are a problem?
| [...]
| But in a local files approach, I can see the following being cached:
|=20
| /etc/services
| /etc/protocols
| /etc/hosts
| /etc/passwd
| /etc/rpc
For /etc/passwd, getpwent(3) (et al) already use a db(3) database.
There's no reason we can't consider /etc/services.db (etc)
and implement an nsswitch "db" database lookup for these.
We have db(1) to easily create db(3) files.
--4MRJAMMELAbUsYLE
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (NetBSD)
iD8DBQFEHexrpBhtmn8zJHIRArSJAJ9bXUg9CYPbD797FSLMTQ469pT2YQCfRd4s
Dh9XOiD2XSaaw4OlHA8uxgA=
=HSXt
-----END PGP SIGNATURE-----
--4MRJAMMELAbUsYLE--