3.3.6. Advanced Feature: Tuning Database Link Performance

The following sections provide information on tuning the performance of database links through connection and thread management.

3.3.6.1. Managing Connections to the Remote Server

Each database link maintains a pool of connections to a remote server. The connections to optimize resources can be configured for the directory.
3.3.6.1.1. Managing Connections to the Remote Server Using the Console
  1. In the Directory Server Console, select the Configuration tab.
  2. Expand the Data folder in the left pane and locate the database link to change. Click the database link, then click the Limits and Controls tab in the right navigation pane.
  3. In the Connection Management section, make changes to any of the following fields:
    • Maximum TCP connection(s). The maximum number of TCP connections that the database link establishes with the remote server. The default value is 3 connections.
    • Bind timeout. Amount of time, in seconds, before the database link's bind attempt times out. The default value is 15 seconds.
    • Maximum binds per connection. Maximum number of outstanding bind operations per TCP connection. The default value is 10 outstanding bind operations per connection.
    • Time out before abandon (sec). Number of seconds before the server checks to see if a timed-out connection should be abandoned. The default value is 1 second.
    • Maximum LDAP connection(s). Maximum number of LDAP connections that the database link establishes with the remote server. The default value is 10 connections.
    • Maximum bind retries. Number of times a database link attempts to bind to the remote server. A value of 0 indicates that the database link will try to bind only once. The default value is 3 attempts.
    • Maximum operations per connection. Maximum number of outstanding operations per LDAP connection. The default value is 2 operations per connection.
    • Connection lifetime (sec). How long a connection made between the database link and remote server remains open. Connections between the database link and the remote server can be kept open for an unspecified time or closed after a specific period of time. It is faster to keep the connections open, but it uses more resources. For slow connections, it may be desirable to limit the connection time. A value of 0 indicates there is no limit. By default, the value is set to 0.
  4. Click Save.
3.3.6.1.2. Managing Connections to the Remote Server from the Command Line
Use ldapmodify to add connection attributes to the database link entry.
The default connection management attributes are stored in the following entry:
cn=default instance config,cn=chaining database,cn=plugins,cn=config
The connection management attributes for a specific database link are stored in the following entry:
cn=database_link,cn=chaining database,cn=plugins,cn=config
The connection management attributes specified in this entry take precedence over the attributes specified in the cn=default instance config entry.

Table 3.5. Database Link Connection Management Attributes

Attribute Name Description
nsOperationConnectionsLimit Maximum number of LDAP connections that the database link establishes with the remote server. The default value is 20 connections per database link instance.
nsBindConnectionsLimit Maximum number of TCP connections that the database link establishes with the remote server. The default value is 3 connections.
nsConcurrentOperationsLimit Maximum number of outstanding operations per LDAP connection. The default value is 2 operations per connection.
nsConcurrentBindLimit Maximum number of outstanding bind operations per TCP connection. The default value is 10 outstanding bind operations.
nsBindRetryLimit Number of times a database link attempts to bind to the remote server. A value of zero (0) indicates that the database link will try to bind only once. The default value is 3 attempts.
nsConnectionLife Connection lifetime, in seconds. Connections between the database link and the remote server can be kept open for an unspecified time or closed after a specific period of time. It is faster to keep the connections open, but it uses more resources. For example, it may be wise to limit the connection time for a slow connection. A value of 0 indicates there is no limit. By default, the value is set to 0. When the value is 0 and there is a list of failover servers in the nsFarmServerURL attribute, the first server is never contacted after failover to the alternate server. The default value is 0 seconds.
nsBindTimeout Amount of time, in seconds, before the bind attempt times out. The default value is 15 seconds.
nsAbandonedSearchCheckInterval Number of seconds that pass before the server checks for abandoned operations. The default value is 1 second.

For the list of database link configuration attributes, see Table 3.4, “Database Link Configuration Attributes”.