On Thu, 2010-12-16 at 17:05:13 -0500, Wietse Venema wrote: > Scott Lambert: > > > OK, before less-informed people start to spread urban legends, I did > > > all the measurements with the default nsswitch.conf file (see below) > > > which contains the exact same entries that were making your system > > > crawl. > > > > > > So, while Postfix is now performing better for you, I am less > > > convinced that everything is kosher, unless someone can explain to why > > > the default nsswitch.conf was no good for your particular system (or > > > why it was burning up 98% CPU in kernel mode). > > > > This is not postfix specific. Just in case anyone was inferring > > that. > > > > It has to do with the number of entries in the password file. I > > do not remember the details for why, but with thousands of users > > in the password file anything that maps usernames to uids gets slow > > with passwd and group set to compat. The first time I saw the > > problem was with ls -l in /home on a machine with thousands of > > users. It took minutes. ls -ln completed as quickly as the pty > > could display the output. > > Thanks for the backgrouns. > > Could you please file a bug report. Originally, 4.4BSD uses a hashed > password file, so there is no excuse why lookups from file should > be slow, especially with the default nsswitch file which is what > everyone ends up using.
A bug report[1] about a similar problem was filed several years ago. Remarkably, it remains open. I hope to convince someone to take a look soon. [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=75855 -- Sahil Tandon <sa...@freebsd.org>