The following sections provide information about how you can improve the performance of eDirectory on UNIX* systems:
Novell eDirectory on Linux* and Solaris* uses a dynamically adjusted thread pool to service client requests. The thread pool is self-adjusting and delivers optimum performance in most cases. However, you can avoid the delay caused by starting up threads when there is a sudden load on the server by setting the following parameters in the /etc/nds.conf file.
Table 138.
Parameter | Description |
---|---|
n4u.server.max-threads |
Absolute maximum number of threads |
n4u.server.idle-threads |
Number of threads to be kept idle |
n4u.server.start-threads |
Number of threads to be pre-started |
Set the value for the n4u.server.max-threads parameter based on the maximum number of simultaneous clients that need to be serviced. Novell eDirectory internally needs about 16 threads for regular usage. You can add one thread for every 255 LDAP connections to monitor LDAP connections. Add an additional thread for every four clients that need to be serviced simultaneously. Set the value for the n4u.sserver.idle-threads and n4u.server.start-threads parameters based on the average client load.
A number of LDAP Server objects can be members of one LDAP group. All the LDAP servers share the properties of the LDAP Group object (for example, class and attribute mappings, proxy user, and so on). Therefore, if you have a list of your own class and attribute mappings to add, you can add them in one group and make all the servers a member of this group.
eDirectory uses persistent caching so that changes being made to a server are held in a vector. If the server crashes in the middle of changes, eDirectory will load faster and synchronize the changes in seconds when the server is brought back up. Novell eDirectory uses a rollback model with a log file to roll forward transactions in the event of a system failure.
Novell eDirectory uses approximately 50% of available free memory for the cache, leaving at least 24 MB for the OS. This algorithm is used only if the host OS supports the call that enables you to determine the amount of free memory available. Although this algorithm works well for Windows and NetWare, it does not work for UNIX systems. On UNIX systems, the free available memory reported by the OS will be less than other operating systems because of the way the UNIX OS uses free memory for internal caching of file system blocks, frequently run programs, libraries, and so on. In addition to this memory allocation, libraries on UNIX normally do not return the freed memory back to the OS.
For these reasons, we recommend allocating a fixed amount of RAM to the cache. To do this, create a file called _ndsdb.ini in the DIB Set directory (/var/nds/dib by default), then specify a value for the cache parameter in the file. Novell eDirectory internally allocates this cache equally between the block cache and record cache. The cache parameter can be set to either an absolute value or the following set of parameters separated by commas:
Table 139.
According to the algorithm, the default setting for Novell eDirectory is the following:
cache=dyn,avail,%:50,min:8388508,max:4294967295,leave:25165824
This indicates the following:
eDirectory operates with a hard limit of 16 MB, so that all applications are started and the system is stabilized.
You can also configure Novell eDirectory to use a percentage of the total memory. To do so, specify the cache as shown below:
cache=hard,total,%:percentage_of_total_memory_in_bytes
By default, eDirectory uses dynamic cache. If you have sufficient RAM to increase the eDirectory cache size, you can increase the performance of eDirectory considerably for large databases by allocating more RAM to the eDirectory cache. For more information, see Optimizing eDirectory Cache. Performance of bulkload using the Import/Export utility is affected considerably by cache size. (A larger cache size is faster.)
Cache size is set using the following command at the ndstrace command line:
set ndstrace = !m[hexadecimal KB]
or
set ndstrace = !mb[bytes]
For example, the set ndstrace=!m4F00 command allocates approximately 20 MB of RAM to the eDirectory cache. If eDirectory is the server's only application, you can set the eDirectory cache up to 80% of the total memory.
IMPORTANT: You should avoid setting the cache memory size above 40% of the total memory if the server is hosting services or applications other than eDirectory.
The smallest tested cache size is 0 and the largest is 2 GB. Determining the proper cache size depends on the memory needs of other processes running on the same server, and on the amount of disk cache required. You should test a variety of cache sizes to find a good balance. If eDirectory is essentially the only application, give it as much cache as possible. All allocated cache will eventually be used. eDirectory performance on highly volatile data is improved with more cache.
To optimize the bulkload performance, allocate a higher percentage of the Novell eDirectory cache for block cache. We recommend setting a value of 80% for block cache. To do so, modify the value for the blockcachepercentage parameter in the _ndsdb.ini file located in the /var/nds directory. The cache parameter must be set before you specify a value for the blockcachepercentage parameter.
The LBURP transaction size determines the number of records that will be sent from the Novell Import/Export client to the LDAP server in a single LBURP packet. You can increase the transaction size to ensure that multiple add operations can be performed in a single request. The transaction size can be modified by specifying the required value for the n4u.ldap.lburp.transize parameter in /etc/nds.conf. The default transaction size is 25. The default value is appropriate for small LDIF files, but not for large number of records. You can provide a transaction size in the hard-limit range of 1 and 250.
In ideal scenarios, a higher transaction size ensures faster performance. However, the transaction size must not be set to arbitrarily high values for the following reasons:
See Debugging LDIF Files for more information.
See Enabling Forward References for more information.
Ensure that you have applied all the recommended patches to the Solaris OS. For more information, see Solaris.
The following sections provide information about how can tune the Solaris kernel, network, and file system:
You can set the following kernel variables in the /etc/system file on the Solaris system to optimize the performance of Novell eDirectory:
set priority_paging=1
set maxphys=1048576
set md_maxphys=1048576
set ufs:ufs_LW=1/128_of_available_memory
set ufs:ufs_HW=1/64_of_available_memoryset tcp:tcp_conn_hash_size=8192 (This can be increased to 262144 based on the number of LDAP clients.)
You can enhance LDAP search performance using the Solaris ndd command, which allows you to analyze and modify tunable parameters that affect networking operation and behavior. Use the following syntax to do so:
ndd -set /dev/tcp variable_name variable_value
The recommended values for the variables that you can set are provided below:
tcp_conn_req_max_q: 1024
tcp_close_wait_interval: 60000
tcp_xmit_hiwat: 32768
tcp_xmit_lowat: 32768
tcp_slow_start_initial: 2
Novell eDirectory performance on Solaris can be improved if the Solaris file system is adequately tuned, especially for bulk loading data into the directory. File system tuning for Novell eDirectory is similar to tuning for a database. See the Sunworld* Web site for more information on the Solaris file system.