Re: Suggested dual human/binary interface for proc/devfs

From: Mike Harrelson (mikeh@mindspring.com)
Date: Sat Apr 08 2000 - 23:47:36 EST


On Sat, 8 Apr 2000, Ed Carp wrote:

> Mike Harrelson (mikeh@mindspring.com) writes:
>
> > On Sat, 8 Apr 2000, Andrea Arcangeli wrote:
> >
> > > On Fri, 7 Apr 2000, Ed Carp wrote:
> > >
> > > > [..] On
> > > >the other hand, having 100,000 entries in /etc/passwd takes a while to
> > > >search, and those sorts of things are what people point to when they
> > > >talk about lack of scalability.
> > > >
> > > >I don't know what the answer is - perhaps a replacement library for
> > > >things like getpwent and friends [..]
> > >
> > > Use the `db' format in /etc/nsswitch.conf with lots of users. It uses low
> > > complexity algorithm for the lookup operation. It only requires you to
> > > rebuild the db after each update of the ASCII passwd file.
> >
> > Isn't the nscd daemon suppose to provide fast passwd lookups by caching? I
> > don't know how fast it is compared to a db lookup, but it doesn't require the
> > rebuilding of the passwd db everytime a change is made. For large passwd
> > files, the rebuilding of a db file can be expensive.
>
> Uh, folks? That wasn't the point. Using /etc/passwd WAS AN EXAMPLE.
> There are LOTS of flat files in UNIX that have this problem. Stop trying
> to solve specific problems - solve the generic ones, it'll go a lot
> farther.

"Generic" problems are difficult, if not impossible, to solve precisely
because they are non-specific. It then becomes difficult to even define the
problem that you are trying to solve. As a result, no one can agree on what
precisely needs to be fixed or if it is even broken. ASCII works fine for
most system flat text files because 1) they aren't usually parsed that often,
2) they need to be hand edited, and 3) usually don't contain 100,000 entries.
Other files like utmp/wtmp need to be binary because they shouldn't be hand
edited and need to be updated frequently in an efficient matter. The example
you gave is a rather extreme case and doesn't generally apply to most of the
flat text files in question.

-- mikeh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:12 EST