BIND 9.2.4rc8 Multithreading on Win32

Danny Mayer mayer at gis.net
Fri Sep 10 03:11:41 UTC 2004


At 08:52 PM 9/9/2004, Vinny Abello wrote:
>I've been reading that threading is enabled by default on certain platforms
>with the newer BIND 9 versions and you can also manually enable it when
>compiling it. However, what about the Win32 binary package available from
>ISC? Is it enabled by default? If not, how do you enable it? Is this
>related to the the -n option?

Windows only comes multithreaded even if you compile it yourself.
The socket code requires it in order to handle the I/O properly and
deal with the I/O Completion Ports and the accept/connect requests.

>I have three servers running BIND. One has two processors with
>hyperthreading (and BIND correctly identifies 4 CPU's in the event log when
>starting). On the other two servers there is only a single processor and
>BIND reflects that in the event log. If I start named.exe from the command
>line with -f -n4 it will show 4 processors in the event log.

Well not really. It should say 4 worker threads or something like that.
That's what you're really forcing.

>  If I modify
>the image path in the registry to do just -n4 and start it, it only shows 1
>CPU. Is this possibly a bug in named or at least the Win32 version? Does it
>require the -f to listen to the -n switch making it only useful when not
>running as a service?

That's probably a bug in the code since the switch should be passed up
into the main code.

>More importantly, am I even barking up the right tree doing this? Is this
>how you "enable" threading on Win32? Thanks in advance for any help, advice
>and/or answers!

You are barking up the wrong tree. It has plenty of threads. If you use the
task manager and look at processes and add the thread count under
Views->Select columns you will see that named has a number of threads
in use. I have 8 currently. The number can increase or decrease depending
on the number of TCP queries that are active.

You really shouldn't need the -n switch. The main effect on Windows is to
increase the number of I/O Completion Port worker threads. I make also
affect some of the internal task management.

Danny

>Vinny Abello
>Network Engineer
>Server Management
>vinny at tellurian.com
>(973)300-9211 x 125
>(973)940-6125 (Direct)
>PGP Key Fingerprint: 3BC5 9A48 FC78 03D3 82E0  E935 5325 FBCB 0100 977A
>
>Tellurian Networks - The Ultimate Internet Connection
>http://www.tellurian.com (888)TELLURIAN
>
>There are 10 kinds of people in the world. Those who understand binary and
>those that don't.
>



More information about the bind-users mailing list