Show Table of Contents
Chapter 7. Setting the Number of Directory Server Threads
The number of threads Directory Server uses to handle simultaneous connections affects the performance of the server. For example, if all threads are busy handling time-consuming tasks (such as
add
operations), new incoming connections are queued until a free thread can process the request.
If the server provides a low number of CPU threads, configuring a higher number of threads can increase the performance. However, on a server with many CPU threads, setting a too high value does not further increase the performance.
In instances created using Directory Server 10.1.1 or later, the number of threads Directory Server creates is calculated automatically by default. This number is based on the hardware resources of the server when the instance starts.
If you upgraded from a version earier than 10.1.1 or if you manually set the number of threads, re-enable auto-sizing for optimized performance. For details, see Section 7.1, “Enabling Automatic Thread Tuning”.
Note
Red Hat recommends to use the auto-tuning settings. Do not set the number of threads manually.
7.1. Enabling Automatic Thread Tuning
Directory Server can automatically set the number of threads based on the available hardware threads:
- Enable auto-setting the number of threads:
# ldapmodify -D "cn=Directory Manager" -W -x dn: cn=config changetype: modify replace: nsslapd-threadnumber nsslapd-threadnumber: -1
With this setting, Directory Server will use the following optimized number of threads:Number of CPU ThreadsNumber of Directory Server Threads116216424832164832646496128192256384512512[a]1024512 [a]2048512 [a][a] The recommended maximum number of threads is applied.Note
If you enabled the automatic setting, thensslapd-threadnumber
parameter shows the calculated number of threads while Directory Server is running. - Restart the Directory Server instance:
# systemctl start dirsrv@instance_name