Using 2 CPUs with BIND
Mike Diggins
mike.diggins at mcmaster.ca
Fri Jan 2 18:26:22 UTC 2009
On Fri, 2 Jan 2009, Stacey Jonathan Marshall wrote:
> Mike Diggins wrote:
>>
>> Thanks. Would this imply it has detected multiple CPUs? I still don't see
>> any mention of it in my logs.
> The below output does indicated that you have five threads. I'm not sure why
> your log is not showing the message. Double check the log configuration and
> check /var/adm/messages for other messages indicating a problem.
Ah ha! It was my logging settings after all. I had to change daemon.notice
to daemon.info on this line of syslog.conf:
*.err;kern.debug;daemon.info;mail.crit;local3.none;local4.none
/var/adm/messages
Now I see it has found two CPUs and a bunch of other messages I've never
seen before. Thanks everyone for the help!
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.notice] starting
BIND 9.4.3 -n 2 -c /etc/named.conf
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] found 2
CPUs, using 2 worker threads
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] using up to
4096 sockets
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] loading
configuration from '/etc/named.conf'
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] using
default UDP/IPv4 port range: [1024, 65535]
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] using
default UDP/IPv6 port range: [1024, 65535]
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] listening on
IPv4 interface lo0, 127.0.0.1#53
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] listening on
IPv4 interface bge0, 130.113.199.8#53
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: 127.IN-ADDR.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: 254.169.IN-ADDR.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: 2.0.192.IN-ADDR.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: 255.255.255.255.IN-ADDR.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone:
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: D.F.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: 8.E.F.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: 9.E.F.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: A.E.F.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.info] automatic
empty zone: B.E.F.IP6.ARPA
Jan 2 13:18:49 newblack named[2319]: [ID 873579 daemon.notice] command
channel listening on 127.0.0.1#953
-Mike
>
> Stace
>>
>> 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
>>>
More information about the bind-users
mailing list