Using 2 CPUs with BIND

Stacey Jonathan Marshall Stacey.Marshall at Sun.COM
Fri Jan 2 14:15:00 UTC 2009


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




More information about the bind-users mailing list