13.2 NSS

Execute the following commands at the nsscon console prompt. To start the nsscon console, do the following:

  1. As a root user, open a terminal console.

  2. At the console prompt, enter nsscon.

13.2.1 IDCacheSize

nss /IDCacheSize=value

This sets the maximum number of entries for NSS GUID to ID, and ID to GUID cache.

For example, nss /IDCacheSize = 256000

Default: 16384

Range: 16384 to 524288

Recommendation: The recommendation is to set the IDCacheSize to the corresponding number of users accessing the file system. For example, if the user home directories are around 4000, then the recommended IDCacheSize is 4000.

13.2.2 Minimum Buffer Cache

To set the Minimum Number of Cache Buffers to use for the kernel memory:

nss /MinBufferCacheSize=value

where value is the number of 4 KB buffers.

The default value is 30000. The maximum setting is the amount of memory in KB divided by 4 KB. For a 32-bit machine, the maximum setting is 250000 buffers.

13.2.3 Setting the Name Cache Size

The NSS Name Cache is responsible for caching the Name Tree information. This is the information that is read when you perform any kind of search by file or directory name. The Name Cache maps a name to a ZID (a unique file object ID). Directory listings do not do this as much as normal file opens that must resolve each name in the file path.

Use the NameCacheSize parameter to specify the amount of recently used Name Tree entries for files and directories that NSS caches. Each entry uses about 150 bytes of memory. Increasing the maximum number of Name Cache entries does not necessarily improve the performance for getting directory listing information. This happens because NSS looks up information about the file from a tree or structure outside of the name tree.

If you want to see how your name cache is performing, use the nsscon /NameCacheStats command in the shell prompt.

nsscon /NameCacheSize=<value>

If you are already inside the NSSCON console prompt, use /NameCacheSize=<value> or nss /NameCacheSize=<value>.

Specify the maximum number of recently used Name Tree entries for files and directories to cache. Name cache grows up to the specified limit. Unlike the file system cache, it does not take the maximum amount of memory allocated from the start.

Default: 100000

Range: 17 to 1000000

For more information on tuning NSS performance on Linux, see Tuning Cache Buffers for NSS and Configuring or Tuning Group I/O in the OES 11 SP2: NSS File System Administration Guide for Linux.