Re: Password file with over 3000 users.
Emmanuel Halbwachs wrote:
> Marc Schiffbauer a écrit (Tue, Sep 18, 2007 at 06:24:34PM +0200) :
>> Installing nscd might be worth a try.
>> I *can* speedup your system.
> nscd *sigh* ... As we use LDAP, we need this beast that crashes
> happily several times a day.
> We need a every-5' cronjob to restart it if it has disappeared.
> rm -f /var/db/nscd/*; /etc/init.d/nscd start
> In other words: I can't really recommend nscd.
I've managed several OpenLDAP setups, with nscd and several thousand
users, the key is to properly configure nscd, which needs a properly
sized hash table to operate.
/etc/nscd.conf has a suggested-size parameter for passwd, it should be a
prime number, we chose a number bigger than twice the size of our
expected user base. Its default is 211, which is too small for lots of
This way, nscd usually stops failing (usually, it can fail if you set
it up for more databases than needed, like hosts). You can use the
bsdgames "primes" program to get the hash size.