26.4 Setting the Cache Buffers

A cache buffer is 4 KB block of RAM that temporarily stores data. When you install NSS, it consumes 85% of the cache buffers by default.

Use the following commands at the server console to set your cache buffers or tune your cache parameters. You can set or tune cache buffers at anytime.

Task

Purpose

Command

Set the number of cache buffers allocated for NSS

This sets the minimum number of cache buffers allocated for NSS file system access. The default and minimum number of cache buffers is 512. The range is 256 to memory size in KB/4 KB. Recommended is 20000.

On a server with only NSS volumes, you can adjust the /CacheBalance parameter to 85% without any problem. However, you should monitor the Least Recently Used (LRU) Sitting Time on the NetWare server to ensure that you are not running the server too low on memory.

To safeguard against this, use the nss /MinOSBufferCacheSize command to set a hard limit for the amount of RAM that can be used exclusively by the operating system.

HINT:LRU Sitting Time is found in the Monitor utility under Disk Cache Utilization. Under normal circumstances, the server should be up for over 24 hours, so this statistic should never drop below 24 hours.

nss /MinBufferCacheSize=value

Limit the number of cache buffers

When the cache balance is recalculated, a small amount of RAM is either given or taken away from the NSS Cache.

This parameter controls the maximum cache balance transfer (in 4 KB blocks) that is given to the NSS file system cache per cache balance. The default is 1024 (4 MB) per session. The range is 16 to memory size in KB/4 KB. Recommended is 20000.

If your server has applications running on it that can consume significant amounts of RAM for a short period of time, you might want to increase this parameter.

nss/ CacheBalanceMaxBufferPerSession=value

Look up cache buffers

To quickly look up cache buffers, the cache uses a hashing algorithm that maps names to buckets. Sometimes multiple names map to the same bucket. When this occurs, all names must be searched to determine if the entry is in the cache. The number of entries in the hash table is proportional to the amount of free memory available when you load NSS.

nss/NumHashBuckets

Set the cache for file and directory entries

This sets the number of name cache entries.

[Default=100000; Range=17 to 1000000]

nss/NameCacheSize=value

Use percentages instead of integers for cache balancing

Enables the dynamic balancing of free memory for the NSS buffer cache. Sets the specified percentage of free kernel memory that NSS uses for its buffer cache. [Default=85; Range=1 to 99]

The default is On. Use this command in combination with the /MinBufferCacheSize switch.

nss /(No)CacheBalance

Set the number of authorization cache entries

This specifies the number of cache buffers to be used to speed up authorization requests.

If many trustees are set on different files and directories, we recommend that you increase this number to at least 20000.

[Default=1024; Range=16 to 50000]

nss /AuthCacheSize=value

Show cache buffer statistics

This shows the cache buffer statistics.

nss /CacheStats

Reset cache statistics

This lets you clear the current statistics and start over.

This is useful for checking the results of changes to the system.

nss /reset