practical limit on the number of UIDs

practical limit on the number of UIDs

Tom Goren tom at tomgoren.com
Wed Jun 29 14:38:47 IDT 2011


Also, there is another issue:

1 million users could be a lot to lose, and a few files aren't as resilient
as a DB, which gives you things like replication and redundancy.

Since you stated that only a few users will connect at a time, then sure,
performance isn't an issue.

Maintainability, like Shachar stated is definitely an issue at that scale.

I just wanted to add that data reliability is a factor when dealing with
such a large data set (even just using the 'passwd' command can bork a
shadow file on occasion).

Anyhow - interesting question!

Tom

On Wed, Jun 29, 2011 at 2:02 PM, Nadav Har'El <nyh at math.technion.ac.il>wrote:

> On Wed, Jun 29, 2011, Shachar Shemesh wrote about "Re: practical limit on
> the number of UIDs":
> > When you reach so many users, the problems relating to questions such as
> > "how long does it take nss to parse /etc/passwd" start to be dwarfed by
> > the human cost of maintaining a megaline text file. If for that reason
> > alone, you will need to switch to a DB back end.
>
> I don't know what scenario Muli had in mind, but I can imagine one:
>
> There's a generation-old debate on whether the file system is enough for
> keeping data, big or small, (this is clearly "the Unix way") or whether
> things like separate database software are needed.
>
> Now, imagine that you are hosting, say, a blog site with a million users,
> and
> are one of the big believers of the capabilities of the Unix filesystem.
> Certainly, you say to yourself, you can keep each blog post as a separate
> file and you don't need a database. But to help maintain fool-proof
> security,
> you'd want each of the site's users to have his own uid, and his blog posts
> are writable only to him, so that other users couldn't edit his posts even
> if there was a bug in your web UI. So, can this be done - can you have a
> million different UIDs?
>
> I'd guess there should be no reason why not - the kernel nevers sees a list
> of uids anyway (as far as I know), and just sees a 32-bit integer uid.
> By the way, if you don't intend these users to use the "ordinary" login
> programs (like ssh), there's no reason to actually list them in
> /etc/passwd:
> Nothing prevents you from working with numeric user ids, and if you want
> to convert your site's login names into numeric user ids, you'd most likely
> use some sort of hash table - or even a file system directory ;-) - and not
> a stupid linear file like /etc/passwd.
>
> --
> Nadav Har'El                        |    Wednesday, Jun 29 2011, 27 Sivan
> 5771
> nyh at math.technion.ac.il
> |-----------------------------------------
> Phone +972-523-790466, ICQ 13349191 |Always remember you're unique, just
> like
> http://nadav.harel.org.il           |everyone else.
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110629/a6d28505/attachment.html>


More information about the Linux-il mailing list