How would you handle 5000+ users?

Chip Rosenthal chip at chinacat.Unicom.COM
Wed Nov 7 12:33:02 AEST 1990


In article <1990Nov6.014513.26144 at cims2.uucp> kew at cims2.uucp
	(Keith Walker) writes:
>What happens when you ask XENIX to handle 5000+ users in a passwd
>file?

Anything which attempts a getpwent() et. al. becomes unusable.

I ran some tests with two passwd files: a 44-line version and a 5044-line
version.  The big one was created by appending the active stuff to the
end of 5000-lines of dummy entries, those providing some worst-case
values.  (That is, this guarantees that nearly 5000 lines need to be
scanned before the desired passwd record would be found.)

My results were:

    ------------------------    -----------	-----------

				big passwd	small passwd

    ------------------------    -----------	-----------

    ls -l /etc		real	1:34.36		0:01.52
		    	user	0:53.60		0:00.42
		    	sys	0:05.10		0:00.56

        With a huge passwd file, ls -l would freeze anytime a file with
        different group/user ownership came up and this information needed
        to be retrieved.

    ------------------------    -----------	-----------

    elm			real	0:05.46		0:01.36
		    	user	0:04.10		0:00.62
		    	sys	0:00.86		0:00.58

	    This involved starting up and immediately quitting Elm.

    ------------------------    -----------	-----------

    sending mail	real	0:02.38		0:00.50
		    	user	0:01.88		0:00.08
		    	sys	0:00.34		0:00.22

	This test involved running the command:
	
	    echo "testing" | /usr/lib/sendmail chip bin root uucp

	where sendmail is really smail3.1.

    ------------------------    -----------	-----------

    login			~3 sec		~3 sec

        This was timed on my watch.  Repeatability of my typing is
        +-800msec, and my eyeballs are calibrated to 396msec.

    ------------------------    -----------	-----------

My gut feel is that if users do nothing but use mail, performance will be
degraded but possibly acceptable.  If they plan on talking to a shell,
it will be unusable - stuff like "ls -l" will be too painful.

If you have your heart set on this system, one kludge might be to build
yourself a DBM database of /etc/passwd,  write a modified getpwent() and
friends which use this database, get your hands on available versions of
common utilities (e.g. ls from the GNU fileutils), and compile it with
your library.

Can somebody who knows YP comment on whether something might be done
with a 386 UNIX to make this work?

-- 
Chip Rosenthal  <chip at chinacat.Unicom.COM>
Unicom Systems Development, 512-482-8260 
Our motto is:  We never say, "But it works with DOS."



More information about the Comp.unix.xenix.sco mailing list