<div dir="ltr">Also, there is another issue:<div><br></div><div>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.</div><div><br>
</div><div>Since you stated that only a few users will connect at a time, then sure, performance isn't an issue.</div><div><br></div><div>Maintainability, like Shachar stated is definitely an issue at that scale.</div>
<div><br></div><div>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).</div><div><br></div><div>
Anyhow - interesting question!</div><div><br></div><div>Tom<br><br><div class="gmail_quote">On Wed, Jun 29, 2011 at 2:02 PM, Nadav Har'El <span dir="ltr"><<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Wed, Jun 29, 2011, Shachar Shemesh wrote about "Re: practical limit on the number of UIDs":<br>
<div class="im">> When you reach so many users, the problems relating to questions such as<br>
> "how long does it take nss to parse /etc/passwd" start to be dwarfed by<br>
> the human cost of maintaining a megaline text file. If for that reason<br>
> alone, you will need to switch to a DB back end.<br>
<br>
</div>I don't know what scenario Muli had in mind, but I can imagine one:<br>
<br>
There's a generation-old debate on whether the file system is enough for<br>
keeping data, big or small, (this is clearly "the Unix way") or whether<br>
things like separate database software are needed.<br>
<br>
Now, imagine that you are hosting, say, a blog site with a million users, and<br>
are one of the big believers of the capabilities of the Unix filesystem.<br>
Certainly, you say to yourself, you can keep each blog post as a separate<br>
file and you don't need a database. But to help maintain fool-proof security,<br>
you'd want each of the site's users to have his own uid, and his blog posts<br>
are writable only to him, so that other users couldn't edit his posts even<br>
if there was a bug in your web UI. So, can this be done - can you have a<br>
million different UIDs?<br>
<br>
I'd guess there should be no reason why not - the kernel nevers sees a list<br>
of uids anyway (as far as I know), and just sees a 32-bit integer uid.<br>
By the way, if you don't intend these users to use the "ordinary" login<br>
programs (like ssh), there's no reason to actually list them in /etc/passwd:<br>
Nothing prevents you from working with numeric user ids, and if you want<br>
to convert your site's login names into numeric user ids, you'd most likely<br>
use some sort of hash table - or even a file system directory ;-) - and not<br>
a stupid linear file like /etc/passwd.<br>
<font color="#888888"><br>
--<br>
Nadav Har'El | Wednesday, Jun 29 2011, 27 Sivan 5771<br>
<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a> |-----------------------------------------<br>
Phone +972-523-790466, ICQ 13349191 |Always remember you're unique, just like<br>
<a href="http://nadav.harel.org.il" target="_blank">http://nadav.harel.org.il</a> |everyone else.<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</div></div></blockquote></div><br></div></div>