nscd Settings
Linux systems provide a cache daemon, nscd, which provides a cache for the most common name service requests. The nscd daemon caches the profiles of user and group entries, improving the performance of operating system commands, such as, ls, and ps. The nscd daemon can be configured using the /etc/nscd.conf file.
Make sure that the Name Service Cache Daemon (nscd) is installed and running at all times.
nscd Parameters
The following is a list of guidelines for the various nscd parameters.
- The value of the suggested-size parameter for passwd database should be a prime number greater than or equal to 1/4th of the users expected to be used.
- Increase the positive-time-to-live parameter for passwd and group database (for example to 3600 (1 hour)). Note that this might result in the cache reflecting outdated information if the eDirectory database is modified.
- Increase the negative-time-to-live parameter for passwd and group database (for example to 600 (10 minutes)). Be aware that this might also result in a newly added user not appearing for up to 10 minutes, if an attempt to read that user's non-existent information was done within 10 minutes.
- Increase the value of the hot-count parameter to 200. nscd will keep up to 200 entries in the cache refreshed all the time.
NOTE: If any of the above parameters are changed, nscd has to be restarted.