nss_ldap / top startup

Gavin Atkinson gavin.atkinson at ury.york.ac.uk
Wed Apr 27 12:06:50 PDT 2005


On Wed, 27 Apr 2005, Gavin Atkinson wrote:
> On Mon, 2005-04-25 at 12:59 +0200, Oliver Brandmueller wrote:
> > The more accounts there are in the LDAP directory, the longer the
> > startup of "top" takes. With the current userbase top takes about 3-4
> > seconds to start (on a mostly idle Dual Xeon 2.8GHz with fast disks and
> > local slapd).
>
> The problem is in machine.c - it iterates over every user in the passwd
> file to figure out what how many characters longest username may be.
> It's nasty and to be honest I think it can/should just be removed.
>
> Try the attached patch just to prove that this is the cause in your case
> too.

Sorry - even with that patch, I suspect you'll have to either run top with
the -u option, or define RANDOM_PW before recompiling it.  If you can, try
both individually, I'd be interested in your finding.

Gavin


More information about the freebsd-stable mailing list