Novell is now a part of Micro Focus

Setting Dynamically-Adjusting NDS Cache Limits

Articles and Tips: tip

Paul Thompson
Novell UK Ltd.

18 Oct 2000


The NDS cache size for Novel Directory Services 8 is set using the following command at the server console:

SET DSTRACE=!m[hexadecimal KB]

or

SET DSTRACE=!mb[bytes]

For example, the command SET DSTRACE=!m4F00 allocates approximately 20 MB of RAM to NDS cache.

If you edit the sys:\_netware\_ndsdb.ini file, you'll see a line similar to the following. This line indicates that a hard memory limit in number of bytes that have been allocated to the cache:

cache=<cache_bytes>

On Windows platforms, you'll usually find the _ndsdb.ini file in the \novell\nds\dibfiles\ directory. On Linux and Solaris platforms, you'll usually find the _ndsdb.ini file in the /var/nds/dibfiles/ directory.

New Options in NDS eDirectory 8.5

In NDS eDirectory 8.5, you can set a hard memory limit or a dynamically-adjusting limit by editing the cache line in the _ndsdb.ini file to include any of the options that you see listed below. (If you use multiple options, they should be separated by commas). The syntax of the cache line is:

cache=<cache_options>

The options include:

  • DYN. Sets a dynamically adjusting limit.

  • HARD. Sets a hard memory limit. %:percentage: Percentage of available or physical memory to use.

  • AVAIL or TOTAL. Percentage of available or total physical memory for hard memory limit only.

  • MIN:number_of_bytes. Minimum number of bytes.

  • MAX:number_of_bytes. Maximum number of bytes.

  • LEAVE:number_of_bytes. Minimum number of bytes to leave.

Here are some examples of setting cache limits:

  • To set a dynamically adjusting limit of 75% of available memory and a minimum of 16 MB:

    cache=DYN,%:75,MIN:16000000
  • To set a hard limit of 75% of total physical memory and a minimum of 16 MB:

    cache=HARD,%:75,MIN:16000000
  • To specify the dynamic adjusting limit interval:

    cacheadjustinterval=number_of_seconds
  • To specify the interval for cleaning up older versions of entries and blocks:

    cachecleanupinterval=number_of_seconds
  • To change the percentage split between block and entry cache:

    blockcachepercent=percent

The percent variable is a number between 0 and 100. The percentage you specify is the percentage of cache memory used for the block cache. The remaining percentage is used for the entry cache. Don't set this to 0%.

You must restart the server for the changes to take effect.

Setting Cache Limits with DSTrace

You can also use DSTrace to configure the dynamically-adjusting and hard memory limits. Some examples of these command lines follow:

  • To set a fixed hard limit, type the following at the server console:

    SET DSTRACE=!MB amount_of_RAM_to_use_in_bytes
  • To set a hard limit of 8 MB:

    SET DSTRACE=!MB8388608
  • To set a calculated hard limit, combine the following options:

    SET DSTRACE=!MHARD,AVAIL or
    TOTAL,%:percent,MIN:number_of_bytes,MAX:number_of_bytes,
    LEAVE:number_of_bytes_to_leave,NOSAVE 
  • To set a hard limit of 75% of total physical memory and minimum of 16 MB, and to specify not to save these options to the startup file:

    SET DSTRACE=!MHARD,%:75,MIN:16777216,NOSAVE 
  • To set a dynamically-adjusting limit:

    SET DSTRACE=!MDYN,%:percent,MIN:number_of_bytes,MAX:
    number_of_bytes,LEAVE:number_of_bytes_to_leave, NOSAVE 
  • To set a dynamic limit of 75% of available memory and a minimum of 8GB:

    SET DSTRACE=!MDYN,%:75,MIN:8388608

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Micro Focus