Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 7. Adjusting IdM Directory Server performance
You can tune the performance of Identity Management’s databases by adjusting LDAP attributes controlling the Directory Server’s resources and behavior.
You can fine-tune the following:
- Adjust how the Directory Server caches data.
- Adjust the Directory Server’s resource limits.
- Adjust timeouts that have the most influence on performance.
- Install an IdM server or replica with custom Directory Server settings from an LDIF file.
7.1. Adjusting the entry cache size in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Do not change this settings, unless you have a strong need to apply your custom values. IdM Directory Server uses the built-in cache auto-sizing feature for optimized performance.
The nsslapd-cachememsize attribute specifies the size, in bytes, for the available memory space for the entry cache. This attribute is one of the most important values for controlling how much physical RAM the Directory Server uses.
If the entry cache size is too small, you might see the following error in the Directory Server error logs in the /var/log/dirsrv/slapd-<instance_name>/errors log file:
REASON: entry too large (83886080 bytes) for the import buffer size (67108864 bytes). Try increasing nsslapd-cachememsize.
REASON: entry too large (83886080 bytes) for the import buffer size (67108864 bytes). Try increasing nsslapd-cachememsize.
Red Hat recommends fitting the entry cache and the database index entry cache in memory.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Disable automatic cache tuning.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend config set --cache-autosize=0
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend config set --cache-autosize=0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Display the database suffixes and their corresponding back ends.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix list
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix list cn=changelog (changelog) dc=example,dc=com (userroot) o=ipaca (ipaca)Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command displays the name of the back end database next to each suffix. Use the suffix’s database name in the next step.
Set the entry cache size for the database. This example sets the entry cache for the userroot database to 2 gigabytes.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix set --cache-memsize=2147483648 userroot
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix set --cache-memsize=2147483648 userrootCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Directory Server.
systemctl restart dirsrv.target
[root@server ~]# systemctl restart dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
cache-memsizeto a different value, or re-enable cache auto-sizing.
Verification
Display the value of the
nsslapd-cachememsizeattribute and verify it has been set to your desired value.ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=userroot,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-cachememsize
[root@server ~]# ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=userroot,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-cachememsize nsslapd-cachememsize: 2147483648Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.2. Adjusting the database index cache size in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Do not change this settings, unless you have a strong need to apply your custom values. IdM Directory Server uses the built-in cache auto-sizing feature for optimized performance.
The nsslapd-dbcachesize attribute controls the amount of memory the database indexes use. This cache size has less of an impact on Directory Server performance than the entry cache size does, but if there is available RAM after the entry cache size is set, Red Hat recommends increasing the amount of memory allocated to the database cache.
The database cache is limited to 1.5 GB RAM because higher values do not improve performance.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Disable automatic cache tuning, and set the database cache size. This example sets the database cache to 256 megabytes.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend config set --cache-autosize=0 --dbcachesize=268435456
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend config set --cache-autosize=0 --dbcachesize=268435456Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Directory Server.
systemctl restart dirsrv.target
[root@server ~]# systemctl restart dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
dbcachesizeto a different value, or re-enable cache auto-sizing.
Verification
Display the value of the
nsslapd-dbcachesizeattribute and verify it has been set to your desired value.ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-dbcachesize
[root@server ~]# ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-dbcachesize nsslapd-dbcachesize: 2147483648Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.3. Re-enabling database and entry cache auto-sizing in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Use the built-in cache auto-sizing feature for optimized performance. Do not set cache sizes manually.
By default, the IdM Directory Server automatically determines the optimal size for the database cache and entry cache. Auto-sizing sets aside a portion of free RAM and optimizes the size of both caches based on the hardware resources of the server when the instance starts.
Use this procedure to undo custom database cache and entry cache values and restore the cache auto-sizing feature to its default values.
|
|
This settings controls how much free RAM is allocated for auto-sizing the database and entry caches. A value of |
| Default value |
|
| Valid range |
|
| Entry DN location |
|
|
|
This value sets the percentage of free memory determined by |
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- You have previously disabled database and entry cache auto-tuning.
Procedure
Stop the Directory Server.
systemctl stop dirsrv.target
[root@server ~]# systemctl stop dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow Backup the
/etc/dirsrv/slapd-<instance_name>/dse.ldiffile before making any further modifications.cp /etc/dirsrv/slapd-<instance_name>/dse.ldif \ /etc/dirsrv/slapd-<instance_name>/dse.ldif.bak.$(date "+%F_%H-%M-%S")
[root@server ~]# cp /etc/dirsrv/slapd-<instance_name>/dse.ldif \ /etc/dirsrv/slapd-<instance_name>/dse.ldif.bak.$(date "+%F_%H-%M-%S")Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
/etc/dirsrv/slapd-<instance_name>/dse.ldiffile:Set the percentage of free system RAM to use for the database and entry caches back to the default of 10% of free RAM.
nsslapd-cache-autosize: 10
nsslapd-cache-autosize: 10Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the percentage used from the free system RAM for the database cache to the default of 25%:
nsslapd-cache-autosize-split: 25
nsslapd-cache-autosize-split: 25Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Save your changes to the
/etc/dirsrv/slapd-<instance_name>/dse.ldiffile. Start the Directory Server.
systemctl start dirsrv.target
[root@server ~]# systemctl start dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Display the values of the
nsslapd-cache-autosizeandnsslapd-cache-autosize-splitattributes and verify they have been set to your desired values.ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-cache-autosize nsslapd-cache-autosize: *10
[root@server ~]# ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-cache-autosize nsslapd-cache-autosize: *10 nsslapd-cache-autosize-split: 25Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.4. Adjusting the DN cache size in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Do not change this settings, unless you have a strong need to apply your custom values. IdM Directory Server uses the built-in cache auto-sizing feature for optimized performance.
The nsslapd-dncachememsize attribute specifies the size, in bytes, for the available memory space for the Distinguished Names (DN) cache. The DN cache is similar to the entry cache for a database, but its table stores only the entry ID and the entry DN, which allows faster lookups for rename and moddn operations.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Optional: Display the database suffixes and their corresponding database names.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix list
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix list dc=example,dc=com (userroot)Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command displays the name of the back end database next to each suffix. Use the suffix’s database name in the next step.
Set the DN cache size for the database. This example sets the DN cache to 20 megabytes.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix set --dncache-memsize=20971520 userroot
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix set --dncache-memsize=20971520 userrootCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Directory Server.
systemctl restart dirsrv.target
[root@server ~]# systemctl restart dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
dncache-memsizeto a different value, or back to the default of 10 MB.
Verification
Display the new value of the
nsslapd-dncachememsizeattribute and verify it has been set to your desired value.ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=userroot,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-dncachememsize
[root@server ~]# ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=userroot,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-dncachememsize nsslapd-dncachememsize: 20971520Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.5. Adjusting the normalized DN cache size in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Do not change this settings, unless you have a strong need to apply your custom values. IdM Directory Server uses the built-in cache auto-sizing feature for optimized performance.
The nsslapd-ndn-cache-max-size attribute controls the size, in bytes, of the cache that stores normalized distinguished names (NDNs). Increasing this value will retain more frequently used DNs in memory.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Ensure the NDN cache is enabled.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ndn-cache-enabled
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ndn-cache-enabled Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-ndn-cache-enabled: onCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the cache is
off, enable it with the following command.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-ndn-cache-enabled=on
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-ndn-cache-enabled=on Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-ndn-cache-enabled"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Retrieve the current value of the
nsslapd-ndn-cache-max-sizeparameter and make a note of it before making any adjustments, in case it needs to be restored. Enter the Directory Manager password when prompted.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ndn-cache-max-size
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ndn-cache-max-size Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-ndn-cache-max-size: 20971520Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
nsslapd-ndn-cache-max-sizeattribute. This example increases the value to41943040(40 MB).dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-ndn-cache-max-size=41943040
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-ndn-cache-max-size=41943040Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
nsslapd-ndn-cache-max-sizeto a different value, or re-enable cache auto-sizing.
Verification
Display the new value of the
nsslapd-ndn-cache-max-sizeattribute and verify it has been set to your desired value.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ndn-cache-max-size
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ndn-cache-max-size Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-ndn-cache-max-size: 41943040Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.6. Adjusting the maximum message size in the IdM Directory Server Copier lienLien copié sur presse-papiers!
The nsslapd-maxbersize attribute sets the maximum size in bytes allowed for an incoming message or LDAP request. Limiting the size of requests prevents some kinds of denial of service attacks.
If the maximum message size is too small, you might see the following error in the Directory Server error logs at /var/log/dirsrv/slapd-<instance_name>/errors:
Incoming BER Element was too long, max allowable is 2097152 bytes. Change the nsslapd-maxbersize attribute in cn=config to increase.
Incoming BER Element was too long, max allowable is 2097152 bytes. Change the nsslapd-maxbersize attribute in cn=config to increase.
The limit applies to the total size of the LDAP request. For example, if the request is to add an entry and if the entry in the request is larger than the configured value or the default, then the add request is denied. However, the limit is not applied to replication processes. Be cautious before changing this attribute.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Retrieve the current value of the
nsslapd-maxbersizeparameter and make a note of it before making any adjustments, in case it needs to be restored. Enter the Directory Manager password when prompted.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxbersize
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxbersize Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-maxbersize: 2097152Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
nsslapd-maxbersizeattribute. This example increases the value to4194304, 4 MB.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-maxbersize=4194304
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-maxbersize=4194304Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-maxbersize"
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-maxbersize"Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
nsslapd-maxbersizeto a different value, or back to the default of2097152.
Verification
Display the value of the
nsslapd-maxbersizeattribute and verify it has been set to your desired value.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxbersize
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxbersize Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-maxbersize: 4194304Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.7. Adjusting the maximum number of file descriptors in the IdM Directory Server Copier lienLien copié sur presse-papiers!
A value can be defined for the DefaultLimitNOFILE parameter in the /etc/systemd/system.conf file. An administrator with root privileges can set the DefaultLimitNOFILE parameter for the ns-slapd process to a lower value by using the setrlimit command. This value then takes precedence over what is in /etc/systemd/system.conf and is accepted by the Identity Management (IdM) Directory Server (DS) as the value for the nsslapd-maxdescriptors attribute.
The nsslapd-maxdescriptors attribute sets the maximum, platform-dependent number of file descriptors that the IdM LDAP uses. File descriptors are used for client connections, log files, sockets, and other resources.
If no value is defined in either /etc/systemd/system.conf or by setrlimit, then IdM DS sets the nsslapd-maxdescriptors attribute to 1048576.
If an IdM DS administrator later decides to set a new value for nsslapd-maxdescriptors manually, then IdM DS compares the new value with what is defined locally, by setrlimit or in /etc/systemd/system.conf, with the following result:
-
If the new value for
nsslapd-maxdescriptorsis higher than what is defined locally, then the server rejects the new value setting and continues to enforce the local limit value as the high watermark value. - If the new value is lower than what is defined locally, then the new value will be used.
This procedure describes how to set a new value for nsslapd-maxdescriptors.
Prerequisites
- The LDAP Directory Manager password
Procedure
Retrieve the current value of the
nsslapd-maxdescriptorsparameter and make a note of it before making any adjustments, in case it needs to be restored. Enter the Directory Manager password when prompted.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxdescriptors
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxdescriptors Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-maxdescriptors: 4096Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
nsslapd-maxdescriptorsattribute. This example increases the value to8192.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-maxdescriptors=8192
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-maxdescriptors=8192Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-maxdescriptors"
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-maxdescriptors"Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
nsslapd-maxdescriptorsto a different value, or back to the default of4096.
Verification
Display the value of the
nsslapd-maxdescriptorsattribute and verify it has been set to your desired value.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxdescriptors
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-maxdescriptors Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-maxdescriptors: 8192Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.8. Adjusting the connection backlog size in the IdM Directory Server Copier lienLien copié sur presse-papiers!
The listen service sets the number of sockets available to receive incoming connections. The nsslapd-listen-backlog-size value sets the maximum length of the queue for the sockfd socket before refusing connections.
If your IdM environment handles a large amount of connections, consider increasing the value of nsslapd-listen-backlog-size.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Retrieve the current value of the
nsslapd-listen-backlog-sizeparameter and make a note of it before making any adjustments, in case it needs to be restored. Enter the Directory Manager password when prompted.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-listen-backlog-size
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-listen-backlog-size Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-listen-backlog-size: 128Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
nsslapd-listen-backlog-sizeattribute. This example increases the value to192.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-listen-backlog-size=192
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-listen-backlog-size=192Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-listen-backlog-size"
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-listen-backlog-size"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Display the value of the
nsslapd-listen-backlog-sizeattribute and verify it has been set to your desired value.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-listen-backlog-size
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-listen-backlog-size Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-listen-backlog-size: 192Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.9. Adjusting the maximum number of database locks in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Lock mechanisms control how many copies of Directory Server processes can run at the same time, and the nsslapd-db-locks parameter sets the maximum number of locks.
Increase the maximum number of locks if if you see the following error messages in the /var/log/dirsrv/slapd-<instance_name>/errors log file:
libdb: Lock table is out of available locks
libdb: Lock table is out of available locks
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Retrieve the current value of the
nsslapd-db-locksparameter and make a note of it before making any adjustments, in case it needs to be restored.ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-db-locks
[root@server ~]# ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-db-locks nsslapd-db-locks: 50000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
locksattribute. This example doubles the value to100000locks.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend config set --locks=100000
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend config set --locks=100000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully updated database configuration
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully updated database configurationCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Directory Server.
systemctl restart dirsrv.target
[root@server ~]# systemctl restart dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Display the value of the
nsslapd-db-locksattribute and verify it has been set to your desired value.ldapsearch -D "cn=directory manager" -w <directory_manager_password> -b "cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-db-locks
[root@server ~]# ldapsearch -D "cn=directory manager" -w <directory_manager_password> -b "cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config" | grep nsslapd-db-locks nsslapd-db-locks: 100000Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.10. Disabling the Transparent Huge Pages feature in the IdM Directory Server Copier lienLien copié sur presse-papiers!
Transparent Huge Pages (THP) Linux memory management feature is enabled by default on RHEL. The THP feature can decrease the IdM Directory Server (DS) performance because DS has sparse memory access patterns.
How to disable the feature, see Disabling the Transparent Huge Pages feature in Red Hat Directory Server documentation.
7.11. Adjusting the input/output block timeout in the IdM Directory Server Copier lienLien copié sur presse-papiers!
The nsslapd-ioblocktimeout attribute sets the amount of time in milliseconds after which the connection to a stalled LDAP client is closed. An LDAP client is considered to be stalled when it has not made any I/O progress for read or write operations.
Lower the value of the nsslapd-ioblocktimeout attribute to free up connections sooner.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Retrieve the current value of the
nsslapd-ioblocktimeoutparameter and make a note of it before making any adjustments, in case it needs to be restored. Enter the Directory Manager password when prompted.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ioblocktimeout
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ioblocktimeout Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-ioblocktimeout: 10000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
nsslapd-ioblocktimeoutattribute. This example lowers the value to8000.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-ioblocktimeout=8000
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-ioblocktimeout=8000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-ioblocktimeout"
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-ioblocktimeout"Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM directory server’s performance. If it does not improve, repeat this procedure and adjust
nsslapd-ioblocktimeoutto a different value, or back to the default of10000.
Verification
Display the value of the
nsslapd-ioblocktimeoutattribute and verify it has been set to your desired value.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ioblocktimeout
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-ioblocktimeout Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-idletimeout: 8000Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.12. Adjusting the idle connection timeout in the IdM Directory Server Copier lienLien copié sur presse-papiers!
The nsslapd-idletimeout attribute sets the amount of time in seconds after which an idle LDAP client connection is closed by the IdM server. A value of 0 means that the server never closes idle connections.
Red Hat recommends adjusting this value so stale connections are closed, but active connections are not closed prematurely.
| Default value |
|
| Valid range |
|
| Entry DN location |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Retrieve the current value of the
nsslapd-idletimeoutparameter and make a note of it before making any adjustments, in case it needs to be restored. Enter the Directory Manager password when prompted.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-idletimeout
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-idletimeout Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-idletimeout: 3600Copy to Clipboard Copied! Toggle word wrap Toggle overflow Modify the value of the
nsslapd-idletimeoutattribute. This example lowers the value to1800(30 minutes).dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-idletimeout=1800
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config replace nsslapd-idletimeout=1800Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-idletimeout"
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "nsslapd-idletimeout"Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM directory server’s performance. If it does not improve, repeat this procedure and adjust
nsslapd-idletimeoutto a different value, or back to the default of3600.
Verification
Display the value of the
nsslapd-idletimeoutattribute and verify it has been set to your desired value.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-idletimeout
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> config get nsslapd-idletimeout Enter password for cn=Directory Manager on ldap://server.example.com: nsslapd-idletimeout: 3600Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.13. Adjusting the replication release timeout Copier lienLien copié sur presse-papiers!
An IdM replica is exclusively locked during a replication session with another replica. In some environments, a replica is locked for a long time due to large updates or network congestion, which increases replication latency.
You can release a replica after a fixed amount of time by adjusting the repl-release-timeout parameter. Red Hat recommends setting this value between 30 and 120:
- If the value is set too low, replicas are constantly reacquiring one another and replicas are not able to send larger updates.
-
A longer timeout can improve high-traffic situations where it is best if a server exclusively accesses a replica for longer amounts of time, but a value higher than
120seconds slows down replication.
| Default value |
|
| Valid range |
|
| Recommended range |
|
Prerequisites
- The LDAP Directory Manager password
Procedure
Display the database suffixes and their corresponding back ends.
dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix list
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> backend suffix list cn=changelog (changelog) dc=example,dc=com (userroot) o=ipaca (ipaca)Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command displays the names of the back end databases next to their suffix. Use the suffix name in the next step.
Modify the value of the
repl-release-timeoutattribute for the main userroot database. This example increases the value to90seconds.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> replication set --suffix="dc=example,dc=com" --repl-release-timeout=90
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> replication set --suffix="dc=example,dc=com" --repl-release-timeout=90Copy to Clipboard Copied! Toggle word wrap Toggle overflow Authenticate as the Directory Manager to make the configuration change.
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "repl-release-timeout"
Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "repl-release-timeout"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If your IdM environment uses the IdM Certificate Authority (CA), you can modify the value of the
repl-release-timeoutattribute for the CA database. This example increases the value to90seconds.dsconf -D "cn=Directory Manager" ldap://<server_fqdn> replication set *--suffix="o=ipaca" --repl-release-timeout=90*
[root@server ~]# dsconf -D "cn=Directory Manager" ldap://<server_fqdn> replication set *--suffix="o=ipaca" --repl-release-timeout=90* Enter password for cn=Directory Manager on ldap://server.example.com: Successfully replaced "repl-release-timeout"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Directory Server.
systemctl restart dirsrv.target
[root@server ~]# systemctl restart dirsrv.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Monitor the IdM Directory Server’s performance. If it does not improve, repeat this procedure and adjust
repl-release-timeoutto a different value, or back to the default of60seconds.
Verification
Display the value of the
nsds5ReplicaReleaseTimeoutattribute and verify it has been set to your desired value.ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config" | grep nsds5ReplicaReleaseTimeout
[root@server ~]# ldapsearch -D "cn=Directory Manager" -w <directory_manager_password> -b "cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config" | grep nsds5ReplicaReleaseTimeout nsds5ReplicaReleaseTimeout: 90Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The Distinguished Name of the suffix in this example is dc=example,dc=com, but the equals sign (=) and comma (,) must be escaped in the ldapsearch command.
Convert the suffix DN to cn=dc\3Dexample\2Cdc\3Dcom with the following escape characters:
-
\3Dreplacing= -
\2Creplacing,