NS_CACHE configuration parameter

Use the NS_CACHE configuration parameter to define the maximum retention time for entries in the HCL OneDB™ name service caches: the host name/IP address cache, the service cache, the user cache, and the group cache.

onconfig.std value
NS_CACHE host=900,service=900,user=900,group=900,sqlhosts=900
values
Each of the fields takes an integer value equal to or greater than 0.

host = Sets the number of seconds to cache information in the host name or IP address cache.

service = Sets the number of seconds to cache information in the service cache.

user = Sets the number of seconds to cache information in the user cache.

group = Sets the number of seconds to cache information in the group cache.

sqlhosts = Sets the number of seconds to cache information in the sqlhosts cache.

0 = Caching is disabled. The server always gets information from the operating system. You can set an individual cache to 0 or set all name service caches to 0: NS_CACHE 0.

units
Seconds
separators
Separate values with a comma. Do not include blank spaces.
takes effect
After you edit your onconfig file and restart the database server.
When you reset the value dynamically in your onconfig file by running the onmode -wf command.
When you reset the value in memory by running the onmode -wm command.

Usage

For looking up and resolving host names (or IP addresses), service names, users (and passwords) or groups, the database server queries the operating system using appropriate system calls. Similarly, the information from the sqlhosts file is read every time it is needed. You can avoid many of these lookups and file reads by using the HCL OneDB name service caching mechanism, which can keep and reuse each retrieved piece of information for a configurable amount of time. You should set the NS_CACHE configuration parameter if your operating system does not provide its own caching.

For the sqlhosts cache, the file cache of the operating system can be an advantage, but the database server should benefit from the sqlhosts cache more as the open()/read()/close() can be a load for the operating system in a highly concurrent environment.

The server can get information from the cache faster than it does when querying the operating system. However, if you disable one or more of these caches by setting the retention time to 0, the database server queries the operating system for the host, service, user or group information and uses direct access to the sqlhosts file.

Changes that are made to name services at the operating system level are not immediately reflected in the HCL OneDB name server caches: for example, the change of an IP address, a user added to or removed from a group, or a new password. However, you can use the onmode -wf or onmode -wm command to change NS_CACHE information immediately. When you change the value for a particular cache with the onmode -wf or onmode -wm command, the server immediately expires all existing entries in that cache.