Search

Chapter 7. Setting the Number of Directory Server Threads

download PDF
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.
By default, Directory Server automatically calculates the number of threads automatically. This number is based on the hardware resources of the server when the instance starts.

Note

Red Hat recommends to use the auto-tuning settings. Do not set the number of threads manually.

7.1. Automatic Thread Tuning

If you enable automatic thread tuning, Directory Server will use the following optimized number of threads:
Number of CPU Threads
Number of Directory Server Threads
1
16
2
16
4
24
8
32
16
48
32
64
64
96
128
192
256
384
512
512
[a]
1024
512 [a]
2048
512 [a]
[a] The recommended maximum number of threads is applied.

7.1.1. Enabling Automatic Thread Tuning Using the Command Line

Directory Server can automatically set the number of threads based on the available hardware threads. To enable this feature:
  1. Enable automatic setting of the number of threads:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-threadnumber="-1"
  2. Restart the Directory Server instance:
    # dsctl instance_name restart

Important

If you enabled the automatic setting of the number of threads, the nsslapd-threadnumber parameter shows the calculated number of threads while Directory Server is running.

7.1.2. Enabling Automatic Thread Tuning Using the Web Console

Directory Server can automatically set the number of threads based on the available hardware threads. To enable this feature:
  1. Open the Directory Server user interface in the web console. For details, see Logging Into Directory Server Using the Web Console section in the Red Hat Directory Server Administration Guide.
  2. Select the instance.
  3. Open the Server Settings menu, and select Tuning & Limits.
  4. Set the Number Of Worker Threads field to -1.
  5. Click Save.
  6. Click the Actions button, and select Restart Instance.

Important

If you enabled the automatic setting, the Number Of Worker Threads field shows the calculated number of threads while Directory Server is running.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.