Menu Close
Settings Close

Language and Page Formatting Options

Chapter 5. 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.

By default, Directory Server uses an auto-tuning setting. With this setting, the server uses the same number of Directory Server threads as available CPU threads, up to the maximum of 512 Directory Server threads.

Note

Red Hat recommends using the auto-tuning setting. Do not set the number of threads manually.

5.1. Setting the number of threads using the command line

In certain situations, it is necessary to manually set a fix number of Directory Server threads. For example, if you do not use the auto-tuning setting and change the number of CPU cores in a virtual machine, adjusting the number of Directory Server threads can improve the performance.

You can also use this procedure to re-enable the auto-tuning setting if you set a specific number of threads earlier.

Procedure

  1. Set the number of threads Directory Server should use:

    # dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-threadnumber="64"

    Set the nsslapd-threadnumber parameter to -1 to enable the auto-tuning setting.

  2. Restart the instance:

    # dsctl instance_name restart

5.2. Setting the number of threads using the web console

In certain situations, it is necessary to manually set a fix number of Directory Server threads. For example, if you do not use the auto-tuning setting and change the number of CPU cores in a virtual machine, adjusting the number of Directory Server threads can improve the performance.

Note that you cannot use the web console to re-enable the auto-tuning setting if you set a specific number of threads earlier.

Prerequisites

  • You are logged in to the instance in the web console.

Procedure

  1. Navigate to ServerTuning & Limits.
  2. Set the number of threads in the Number Of Worker Threads field.
  3. Click Save Settings.
  4. Click Actions in the top right corner, and select Restart Instance.