How to enable eDirectory cache preallocation

  • 7002682
  • 18-Feb-2009
  • 26-Apr-2012

Environment

Novell eDirectory 8.7.3 for All Platforms
Novell eDirectory 8.8 for All Platforms

Situation

Beginning with eDirectory 8.7.3 IR6, a feature was implemented that allows the preallocation of eDirectory cache when a server boots/ndsd is started.   This feature is also present in all eDirectory 8.8.x builds.

Resolution

To enable eDirectory cache preallocation, do the following:

1. Login to iMonitor
NetWare  - https://ip_address:8009/nds
Windows - https://ip_address:8010/nds
Linux, Solaris, AIX, HP/UX - https://ip_address:8030/nds

a. From the icons at the top of the page, select "Agent Configuration"  | then on the left hand side, select "Database Cache".
b. Under "Database Cache Configuration" Select the radio button for "Hard Limit"  and set the desired "Cache Maximum Size" in KB.
c. Verify the check box 'Cache Settings Permanent' is also selected.
d. Select Submit, to submit your changes.

Note:  Making these changes in iMonitor will create/update the _ndsdb.ini file on the file system.

2. Add preallocatecache=true to the _ndsdb.ini file manually. The _ndsdb.ini is located in different locations, depending upon the operating system that eDirectory is installed on.

Netware - SYS:\_NETWARE\_NDSDB.INI.
(Note: You can use edit.nlm to modify this file, by typing "edit SYS:\_NETWARE\_NDSDB.INI" from the NetWare console.

Windows - C:\novell\NDS\DIBFiles\_ndsdb.ini

Linux, Solaris, HP/UX and AIX -
For eDirectory 8.7.3 - /var/nds/dib/_ndsdb.ini
For eDirectory 8.8.x - /var/opt/novell/eDirectory/data/dib/_ndsdb.ini

NOTE: THE LAST LINE OF THE _NDSDB.INI FILE MUST BE FOLLOWED BY A CARRIAGE RETURN!!! 

This is due to the way the file is parsed.

Additional Information

The preallocate option changes how eDirectory makes requests to the native operating system memory manager.  Prior to eDirectory 8.7.3 IR6, eDirectory would make multiple memory requests to the memory manager for the cache.  In a sense, the "size" of cache would grow over time.  The administrator could set an upper limit, or hard limit, using iMonitor, however the administrator could not control when eDirectory would grow the cache, i.e. make additional requests for memory.

With the release of eDirectory 8.7.3 IR6 the administrator can control when eDirectory makes requests for more memory by using the preallocate option.  When this option is used, eDirectory makes one memory request, at startup time, for the entire amount specified by the hard cache limit.  eDirectory has also been enhanced to control the allocation and deallocation, by the eDirectory cache, of this large memory block.

The advantage of using the preallocate option is the memory allocated to the eDirectory cache will never be fragmented by the native operating system memory manager.  As eDirectory 8.7.3 is a 32 bit application, it can only access a maximum of 4Gb of memory, and some operating systems allow even less for an individual process.

For instance, Red Hat AS 3.0 only allows a maximum of 1.5 Gb.  Prior to eDirectory 8.7.3 IR6, the hard cache limit had to be set to a low level, typically 500 Mb or less.  If set higher, the operating system memory manager would fragment the cache memory, and the ndsd process would keep allocating more and more memory.  In some cases, this would cause the ndsd process to crash.  With eDirectory 8.7.3 IR6 (and greater) and with the preallocate option set, the hard cache limit can be set to a higher level without producing fragmentation and risk of an ndsd crash.  With more memory allocated to the cache, eDirectory can also perform better.

The disadvantage of the preallocate option is that the memory will always be allocated, even if never completely used.  Care must be taken to set the proper hard cache limit, especially if the eDirectory database cache is small, e.g. less than 200 Mb.


How to verify the preallocatecache=true is correctly set.

The amount of memory used should reflect at a minimum the cache amount set in the cache= statement of the _ndsdb.ini file plus whatever memory has been allocated to current eDirectory threads and its services since the last reboot.

NetWare: Load Monitor | System resources | Alloc Memory (Bytes) | Highlight DS.NLM | Look at the "Number in use"  This will be at least the size specified in the cache= statement in the _ndsdb.ini file.

Linux:  Find the process id of ndsd.   ps -eaf | grep ndsd.  Next, use top to find the amount of memory allocated: top -p pid.  The VIRT column is the pertinent one.

Win32: Load TaskManager - Processes and observe the amount of memory used by dhost.


Formerly known as TID# 10097143

Change Log

Brett Berger 2/18/09 - Imported tid to KCS.  Updated title and steps to make it more TID more clear. Moved Explanation to "Additional Info"

Feedback service temporarily unavailable. For content questions or problems, please contact Support.