ndsd thread pool information

  • 7003214
  • 05-May-2009
  • 19-Nov-2012


The command:
ndstrace -c threads
returns the current ndsd thread pool information.
The output is similar to the following:

Thread Pool Information
Summary      : Spawned 46, Died 10
Pool Workers : Idle 7, Total 36, Peak 39
Ready Work   : Current 0, Peak 7, maxWait 192777 us
Sched delay  : Min 61 us, Max 1125514 us, Avg: 8376 us
Waiting Work : Current 14, Peak 19
Novell eDirectory 8.7.3 for Solaris
Novell eDirectory 8.7.3 for Linux
Novell eDirectory 8.7.3 for HP-UX
Novell eDirectory 8.7.3 for AIX
Breakdown of the output from the ndstrace -c threads command:

Summary:  Spawned is the number of threads that have been spawned since ndsd was started.  Died is the number of threads of the total spawned in the dynamic thread pool that have been killed.  Threads for the dynamic thread pool are spawned and killed as load fluctuates.

Pool Workers: Idle is the number of threads currently waiting for work.  Total is the total number of threads currently in the dynamic thread pool.  Peak is the maximum number of threads that has been in the dynamic thread pool.

Ready Work:  Current shows work that is ready to be executed.  Peak is the largest amount of work that was waiting to be worked on by a thread.  maxWait is the maximum amount of time in microseconds that work was waiting for a thread.

Sched delay:  Min, Max and Avg is the schedule delay as seen by the thread pool.

Waiting work:  This is work that has been setup for delayed execution (execution at some point in the future) that will get processed by a Pool Worker thread.  Current indicates the current work setup for delayed execution.  Peak is the maximum amount of work setup for delayed execution.

NOTE: There are two kinds of work (operations/tasks) displayed - Ready Work and Waiting Work.


ndsd thread pool information


Maximum threads for the ndsd thread pool can be increased by adding the following line to the /etc/nds.conf:



ndsconfig set n4u.server.max-threads=##

##=The new number for the max-threads setting

A restart of ndsd is required for the setting to take effect.
Example on Solaris & Linux:
/etc/init.d/ndsd restart

Additional Information

Time measurements are in us=microseconds (one millionth of a second)
Thread Pool Information is statistical information used to help tune the ndsd threads. 

For example:

Pool Workers : Idle 0, Total 64, Peak 64
Ready Work   : Current 4102, Peak 6732, maxWait 697426 us
Waiting Work : Current 11, Peak 23

Tells us that currently all threads are busy processing work (operations/tasks).  There are no idle threads that could immediately begin working on work (operations/tasks) in the Ready Work queue.  The Ready Work will need to wait until threads that are currently processing work (operations/tasks) completes before it will begin to be processed.  At this point in time the maximum amount of time an operation/task has had to wait before being processed is about .7 second (697426us).  
The Pool Workers : Idle 0, Total 64, Peak 64  shows us that ndsd is using the max allowed threads in the pool to process all the work (operations/tasks) that are being submitted to eDirectory on this server.  This would indicate that for ndsd to process work faster it requires more threads so that work (operations/tasks) do not have to sit in the Ready Work queue for very long before being processed.

The ndsd thread pool does more than maintain LDAP and other ndsd connections - there is schema sync, backlinker, purger, janitor, limber, replica sync, DSA requests, ....

The threads in the ndsd thread pool dynamically process the operations that are being submitted to eDirectory on the server.

Formerly known as TID# 10100480