Threaded bind on CentOS

Adam Tkac atkac at redhat.com
Tue Mar 1 09:30:51 UTC 2011


On Mon, Feb 28, 2011 at 09:30:10PM +0000, Jack Tavares wrote:
> Recap:
> running named with "-n 1" will spin up one worker thread
> and approx 4 other threads.

Hello,

> Is there an official discussion or explanation of what these
> other threads do?

official explanation can be found in BIND source code.

$ grep -r isc_thread_create bind-9.8.0rc1/

shows me this (stripped):

1. lib/isc/unix/socket.c
- this thread handles dispatching of all incomming queries. The thread
  reads DNS packet from socket and send it to pool of "worker" threads
  which process it (DNSSEC validation, authoritative/recursive
  response etc.)

2. lib/isc/timer.c
-  this is the timer thread. It handles all timer events, i.e.
   asynchronously put specified actions to pool of "worker" threads

3. the main named process is the third "thread"

other threads, called "worker" threads are created in lib/isc/task.c.

So number of threads (as shown via `ps -eLf |grep named`) is always number
of worker threads + 3.

Regards, Adam

-- 
Adam Tkac, Red Hat, Inc.



More information about the bind-users mailing list