2.2 Thread Pool

eDirectory is multi-threaded for performance reasons. In multi-threading, when the system is busy, more threads are created to handle the load and some threads are terminated to avoid extra overhead. It is inefficient and costly to frequently create and destroy threads. Instead of spawning new threads and destroying them for every task, a number of threads are started and placed in a pool. The system allocates the threads from the thread pool to several tasks as needed. Tasks are held in two types of queues:

Not every module uses the thread pool. The actual number of threads for the process is more than the number that exists in the thread pool. For example, FLAIM manages its background threads separately.

Running the ndstrace -c threads command returns the following thread pool statistics:

An example of a sample thread pool:

There are certain thread pool parameters:

Run the ndsconfig get and ndsconfig set commands to get and set the thread pool size.