Using 2 CPUs with BIND

Mike Diggins mike.diggins at mcmaster.ca
Fri Jan 2 15:23:41 UTC 2009


Thanks. Would this imply it has detected multiple CPUs? I still don't see 
any mention of it in my logs.

diggins at newblack<~># /usr/bin/ps -Lp `pgrep named`
    PID   LWP TTY        LTIME CMD
    605     1 ?           0:00 named
    605     2 ?           0:09 named
    605     3 ?           0:06 named
    605     4 ?           0:34 named
    605     5 ?           0:01 named

-Mike



On Fri, 2 Jan 2009, Stacey Jonathan Marshall wrote:

> Mike Diggins wrote:
>> 
>> I noticed that when BIND 9.2.4 on Redhat Linux (Intel x86) starts, the log 
>> records:
>> 
>> dns1 named[28513]: starting BIND 9.2.4 -u named -t /var/named/chroot
>> dns1 named[28513]: using 2 CPUs
>> 
>> When I start BIND on my Solaris 10 SPARC dual CPU (V210) system 9.4.2-P2,
>> I don't get the message "using 2 CPUs", but that's what I want. I
> The message format changed slightly in BIND 9.4.2-p2, from bin/named/main.c:
>
> #ifdef ISC_PLATFORM_USETHREADS
> 	if (ns_g_cpus == 0)
> 		ns_g_cpus = ns_g_cpus_detected;
> 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
> 		      ISC_LOG_INFO, "found %u CPU%s, using %u worker 
> thread%s",
> 		      ns_g_cpus_detected, ns_g_cpus_detected == 1 ? "" : "s",
> 		      ns_g_cpus, ns_g_cpus == 1 ? "" : "s");
> #else
> 	ns_g_cpus = 1;
> #endif
>
>
>
>> compiled it with './configure --prefix=/usr/local/bind --enable-threads'
> Take a look at the config.log output to check that threading is indeed 
> enabled, it should be by default anyhow on Solaris 10 system.
>> and start it with '/usr/local/bind/sbin/named -n 2 -c /etc/named.conf'.
>> How do I know it's actually using the two SPARC CPUs?
> Use "/usr/bin/ps -Lp `pgrep named`" will show you the number of 
> light-weight-processes (LWP), threads, running for the named process. 
> Incidently the '-n' option shouldn't be necessary, named can detect the 
> number of CPU's on Solaris.
>
> Regards,
>
> Stace
>
>
>
>> 
>> -Mike
>>
>>             _________________________________________
>> 
>> Mike Diggins                   Voice:  905.525.9140 Ext. 27471
>> Network Analyst, Enterprise Networks    FAX:    905.522.0511
>> University Technology Services         E-Mail: mike.diggins at mcmaster.ca
>> McMaster University, Hamilton, Ontario
>> 
>> 
>> _______________________________________________
>> bind-users mailing list
>> bind-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-users
>
>


             _________________________________________

Mike Diggins       			Voice:  905.525.9140 Ext. 27471
Network Analyst, Enterprise Networks    FAX:    905.522.0511
University Technology Services 		E-Mail: mike.diggins at mcmaster.ca
McMaster University, Hamilton, Ontario





More information about the bind-users mailing list