tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Jerry Berkman <jerry () violet ! berkeley ! edu>
To: tru64-unix-managers
Subject: useradd is cpu and memory hog
Date: Wed, 16 Jul 1997 23:18:54 +0000	[thread overview]
Message-ID: <96078614710417.tru64-unix-managers.marc@archive.invalid> (raw)


At UC Berkeley on the main email server, we have a system whereby
students, faculty fill out a Web form, and then new email accounts
are created every few hours automatically.  We used to do this
with homegrown code which changed /etc/passwd and created the tcb files
(e.g. /tcb/files/auth/j/jerry for logon "jerry").  This program
took a negligible amount of cpu time.

When we upgraded to Digital UNIX 4.0B, we switched from the home-grown
code to the new DEC "useradd" command.  This worked with no problems.
However we had some problems with the new DEC "usermod" command,
which we thought might be cured by switching to the data base format
for the auth files (/tcb/files/auth.db and /var/tcb/files/auth.db).

This turned out not to be the case; the problem with "usermod" is it
wouldn't read any password entries after the first null line in 
/etc/passwd!  So I did vipw and deleted the null lines.
Ever since, useradd has taken about 190 cpu seconds per new account
on our Alpha 2100 4/275.

% acctcom -n useradd

ACCOUNTING RECORDS FROM:  Tue Jul 15 23:55:01 1997 PDT
COMMAND                      START    END          REAL      CPU     MEAN
NAME       USER     TTYNAME  TIME     TIME       (SECS)   (SECS)  SIZE(K)
#useradd   root     ?        11:40:16 11:44:26   250.37   189.03 29327360.00
#useradd   root     ?        11:44:31 11:48:49   258.37   195.20 30875648.00
#useradd   root     ?        11:48:56 11:52:48   232.12   190.23 30035968.00
#useradd   root     ?        13:40:14 13:44:33   259.00   195.25 30593024.00
#useradd   root     ?        13:44:40 13:48:44   244.87   196.17 30957568.00

In mid August, we will be adding 500-600 new accounts per day.  At 190
cpu sec per account, useradd will use over 20 hours of cpu time each day!
Plus it is a big memory hog.

Has anyone else experienced this?  Is there a fix?  If not, we will
need to back out the data base version of the auth files.  Any advice
on the best way to do that?

	- Jerry Berkman, UCBerkeley, jerry@uclink, (510)642-4804

                 reply	other threads:[~1997-07-16 23:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox