TID2020 ( s2020 )
QuickLinkhttp://www.stone-ware.com/swql.jsp?kb=s2020
CategoryeDirectory
SummaryTuning
DetailsAre there any tips for tuning edir for better perfomance with ldap ?
ResolutionFirst thing to speed things up is to set common attributes as an index on each
of the ldap servers. Some of the commonly used attributes that would benefit
from an index are: swareWebApplication, ObjectClass, swareFavorites, swareFlags,
swareMimeMap, swareBrowseClass, swareAdminPanels, swareAssignedUsers,
swareAssignedTo, swareAvailablePanels, swareComponentLayout, swareAssignedLinks,
swareAssignedComponents, swareGuid. Some of these may already be indexed by the system,
others you would add using imanager or consoleone.

The following information is from Novell's web site

Loading and Unloading LDAP Services for eDirectory

LDAP Services for eDirectory can be loaded and unloaded manually. To load LDAP
Services for eDirectory, enter the following commands:


Table 100. Commands to Load LDAP Services for eDirectory

Server Command
NetWare?
At the console prompt, type LOAD NLDAP.NLM.

Windows* NT*/2000
In the DHOST (NDSCONS) screen select NLDAP.DLM > click Start.

Linux* or Solaris*
At the Linux or Solaris prompt, type /usr/sbin/nldap -l


To unload LDAP Services for eDirectory, enter the following commands:


Table 101. Commands to Unload LDAP Services for eDirectory

Server Command
NetWare
At the console pompt, type UNLOADNLDAP.NLM.

Windows NT/2000
In the DHOST (NDSCONS) screen, select NLDAP.DLM > click Stop.

Linux or Solaris
At the Linux or Solaris prompt, type /usr/sbin/nldap -u



Tuning LDAP for eDirectory
The following are the optimal settings for eDirectory LDAP search and
authentication on a server with two processors and 2 GB of RAM:


Table 102. Optimal Settings for eDirectory LDAP Search and Authentication

Maximum TCP port limit
45000

Maximum pending TCP connection requests
4096

Maximum packet receive buffers
10000

Minimum packet receive buffers
3000

Maximum physical receive packet sizes
2048

Maximum concurrent disk cache writes
2000

Maximum concurrent directory cache writes
500

Maximum directory cache buffers
200000

Maximum number of internal directory handles
100

Maximum number of directory handles
20

DSTRACE
!mxxxxxx

Replace xxxxxx with the amount of RAM in bytes to use as cache.

On NT, create a text file named _ndsdb.ini in the directory, then add this line.



Managing the Memory
eDirectory uses memory for the database cache and for directory usage. These are
separate allocated memory pools. The directory engine uses memory from available
memory pools in the operating system as needed. The database uses a cache pool
that is defined by parameters detailed below. Usually, the more database cache
given to eDirectory, the better the performance. However, since eDirectory uses
available system memory for its buffers, if clients are performing queries that
require large data sets to be returned, the size of the database cache might
need to be decreased to have enough system memory for the directory to handle
building the query responses.

The database engine uses the database cache to hold the most recently accessed
blocks. This cache is initially defined with a fixed size of 16 MB. The size of
this cache can be changed from the command line in shipping versions of
eDirectory. The following example command will set the eDirectory database cache
to 80 million bytes:

set dstrace=!mb 80000000

A file named _ndsdb.ini in the SYS:\NETWARE directory on a NetWare server, or in
the directory containing the eDirectory database files on the Windows, Solaris,
and Linux environments (normally \novell\nds\dbfiles) can also be defined. This
text file simply needs to contain a line such as the following:

cache=80000000

Don't add any white space by the equals (=) sign

The cache in eDirectory 8.6 can be initialized with a hard limit just as with
earlier versions. In addition, the upper and lower limits can be set either as
hard numbers or as a percentage of available memory. Dynamic allocation control
parameters allow the cache size to grow or shrink depending on use. If the
proper configuration parameters are set, the database cache dynamically grows or
shrinks based on other system resource needs.

Editing the _ndsdb.ini file can manually control database memory usage. The
format for INI file commands is given below:

cache=cacheBytes # Set a hard memory limit

Alternative formats are shown in Table 103.


Table 103. Alternative INI Commands

Command Description
cache=cache_options
Sets a hard limit or dynamically adjusting limit. Multiple cache options can be
specified in any order, separated by commas. All are optional. They are as
follows:

DYN or HARD
Dynamic or hard limit.

AVAIL or TOTAL
These only apply if a hard limit was chosen. Omit these options for a dynamic limit.

%:percentage
The percentage of available or total physical memory.

MIN:bytes
The minimum number of bytes.

MAX:bytes
The maximum number of bytes.

LEAVE:bytes
The minimum number of bytes to leave for the OS.

blockcachepercent=percentage
Splits the cache between the block and record cache.


If a hard limit is specified and the administrator wants to define the database
cache to use a percentage of the memory, the administrator can select between a
percentage of total memory or a percentage of available memory. Dynamic limits
always refer to a percentage of available memory. The following command examples
are all valid in the _ndsdb.ini file.

The following is an example dynamic limit of 75% available memory, a minimum of

16 million bytes, and 32 million bytes for the OS:

cache=DYN,%:75,MIN:16000000, LEAVE 32000000

The following is an example hard limit of 75% total physical memory, a minimum
of 18 million bytes, and a maximum of 512 million bytes:

cache=HARD, TOTAL,%:75,MIN:18000000, MAX 512000000

The following is an example old style hard limit of 8 million bytes:

cache=8000000

The database cache is divided between block cache and record cache. Block cache
holds data and index blocks that mirror the storage on the disk. Record cache
holds in-memory representations of directory objects and attributes. If updating
or adding to the directory, use the block cache setting. If performing mostly
reads, use the record cache. It is possible to cause a thrashing condition in
both caches if performing numerous sequential updates without allocating cache
size properly. Unless specifically changed, the cache is allocated to be 50%
block cache and 50% record cache. The blockcachepercent option can be included
in the _ndsdb.ini file to specify the percentage of cache allocated to caching
data and index blocks. (The default is 50%.) The remaining cache is used for
entries.

For example, to designate 60% block cache and 40% record cache, enter the following:

blockcachepercent=60

Do not select 100% of the cache for either block or record cache and starve the
other cache type. In general, do not allocate more than 75% of your cache memory
to one or the other type.

Database cache settings can also be controlled using Novell iMonitor.

Although the cache size is dynamic depending on the amount of memory available,
the DSTRACE command can still be used for custom environments.