Improving eDirectory Performance

The most significant setting that affects eDirectory performance is the cache. In earlier versions of NDS®, you could specify a block cache limit to regulate the amount of memory that the directory used for the cache. The default was 8 MB RAM for cache.

With eDirectory 8.5 or above, you can specify a block cache limit and an entry cache limit. The block cache, available in earlier versions of NDS, caches only physical blocks from the database. The entry cache, a new feature in eDirectory 8.5, caches logical entries from the database. The caching of entries reduces the processing time required to instantiate entries in memory from the block cache.

Although there is some redundancy between the two caches, each cache is designed to boost performance for different operations. Block cache is most useful for update operations. Entry cache is most useful for operations that browse the eDirectory tree by reading through entries, such as name resolution.

Both block and entry caches are useful in improving query performance. Block cache speeds up index searching. Entry cache speeds up the retrieval of entries referenced from an index.

The defaults for eDirectory 8.5 are listed below:


Distributing Memory between Entry and Block Caches

With an entry cache and a block cache, the total available memory for caching is shared between the two caches. The default is an equal division. To maintain the amount of block cache available in earlier versions of NDS 8, you need to double the total cache size for eDirectory. If you use the cache to boost LDIF-import performance, for example, you can either double the total cache size or change the default cache settings. To change the default cache settings, refer to Configuring Dynamically Adjusting and Hard Memory Limits.

The more blocks and entries that can be cached, the better the overall performance will be. The ideal is to cache the entire database in both the entry and block caches, although this is not possible for extremely large databases. Generally, you should try to get as close to a 1:1 ratio of block cache to DIB Set as possible. For entry cache, you should try to get as close to a 1:2 or 1:4 ratio. For the best performance, exceed these ratios.


Using the Default Cache Settings

eDirectory 8.5 provides two methods for controlling cache memory consumption: a dynamically adjusting limit and a hard memory limit. You can use either method, but you cannot use them at the same time because they are mutually exclusive. The last method used always replaces any prior settings.


Understanding the Dynamically Adjusting Limit

The dynamically adjusting limit causes eDirectory to periodically adjust its memory consumption in response to the ebb and flow of memory consumption by other processes. You specify the limit as a percentage of available physical memory. Using this percentage, eDirectory recalculates a new memory limit at fixed intervals. The new memory limit is the percentage of physical memory available at the time.

Along with the percentage, you can set a maximum and minimum threshold. The threshold is the number of bytes that eDirectory will adjust to. It can be set as either the number of bytes to use or the number of bytes to leave available. The minimum threshold default is 16 MB. The maximum threshold default is 4 GB.

If the minimum and maximum threshold limits are not compatible, the minimum threshold limit is followed. For example, specify the following settings:

Minimum threshold

8 MB

Percentage of available physical memory to use

75

Maximum threshold

Keep 10 MB available

When eDirectory adjusts its cache limit, there is 16 MB of available physical memory. eDirectory calculates a new limit of 12 MB. eDirectory checks to see whether the new limit falls within the range of minimum and maximum thresholds. In this example, the maximum threshold requires that 10 MB must remain available, so eDirectory sets the limit to 6 MB. However, the minimum threshold is 8 MB, so eDirectory sets the final limit to 8 MB.

With the dynamically adjusting limit, you also specify the interval length. The default interval is 15 seconds. The shorter the interval, the more the memory consumption is based on current conditions. However, shorter intervals are not necessarily better because the percentage recalculation will create more memory allocation and freeing.


Understanding the Hard Memory Limit

The hard memory limit is the method that earlier versions of eDirectory use to regulate memory consumption. You set a hard memory limit in one of the following ways:


Cleaning Up the Cache

NDS 8 creates multiple versions of blocks and entries in its cache for transaction integrity purposes. Earlier versions of NDS 8 did not remove these blocks and entries when they were no longer needed. In eDirectory 8.5, a background process periodically browses the cache and cleans out older versions. This helps minimize cache memory consumption. The default browsing interval is 15 seconds.


Configuring Dynamically Adjusting and Hard Memory Limits

  1. Open _NDSDB.INI in a text editor.

    On NetWare®, this file is in SYS:\NETWARE. On Windows* NT* and Windows 2000, this file is generally in \NOVELL\NDS\DIBFILES.

  2. Add the applicable syntax to the file:


    Table 137.

    Command Variable Explanation Definition

    cache=cache_bytes

    Fixed number of bytes you want used.

    Sets a hard memory limit.

    For example, to set a hard limit of 8 MB, type cache=8000000.

    cache=cache_options

    Multiple options can be specified in any order, separated by commas.

    • 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.

    Sets a hard memory or dynamically adjusting limit.

    For example, to set a dynamically adjusting limit of 75% of available memory and a minimum of 16 MB, type cache=DYN,%:75,MIN:16000000.

    Or to set a hard limit of 75% of total physical memory and a minimum of 16 MB, type cache=HARD,%:75,MIN:16000000.

  3. (Optional) To specify the dynamic adjusting limit interval, add the following line:

    cacheadjustinterval=number_of_seconds

  4. (Optional) To specify the interval for cleaning up older versions of entries and blocks, add the following line:

    cachecleanupinterval=number_of_seconds

  5. (Optional) To change the percentage split between block cache and entry cache, add the following line:

    blockcachepercent=percent

    The variable percent should be 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. We do not recommend setting the percentage to 0.

  6. Restart the eDirectory server for the changes to take effect.


Configuring Limits Using DSTRACE

If you are using eDirectory for NetWare, you can configure the dynamically adjusting and hard memory limits in DSTRACE. You do not need to restart the server for the changes to take effect.

  1. (Optional) To set a fixed hard limit, type the following at the server console:

    SET DSTRACE=!MBamount_of_RAM_to_use_in_bytes

    For example, if you want to set a hard limit of 8 MB, type:

    SET DSTRACE=!MB8388608

  2. (Optional) To set a calculated hard limit, type the following at the server console. Only type the options you want to specify.

    SET DSTRACE=!MHARD,AVAIL OR TOTAL,%:percent,MIN:number_of_bytes,MAX:number_of_ bytes,LEAVE:number_of_bytes_to_leave,NOSAVE

    For example, 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, type:

    SET DSTRACE=!MHARD,%:75,MIN:16777216,NOSAVE

  3. (Optional) To set a dynamically adjusting limit, type the following at the server console:

    SET DSTRACE=!MDYN,%:percent,MIN:number_of_bytes,MAX:
    number_of_bytes,LEAVE:number_of_bytes_to_leave,
    NOSAVE

    For example, to set a dynamic limit of 75% of available memory and a minimum of 8 GB, type:

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



Previous | Next