Hello Matus,
I didn't upgrade the kernel. The kernel supports multiple CPUs. The only
thing that I upgraded was named. I built it from the souce code.The older
version that came with the RedHat OS as a package uses all of the CPUs, yet
when I compile named on the system it will only see 1 CPU.

When I compile and run the following code:


int main()
printf("ncpus: %d\n" , sysconf((_SC_NPROCESSORS_ONLN))):

The result is:
ncpus: 4

There seems to be a problem with the way the 9.4.2 code is getting built on
my RedHat systems.

I compiled using the following:
$INSTALL_DIR/configure --prefix=/opt/named --with-openssl --enable-threads
make install

I have three other servers that have the same problem. They are all running
RedHat es4.
These are production servers, so I require the use of all of the CPUs.

I also tryed starting named without the -n switch and only one CPU is
detected and one worker thread is started.

Thanks for any Help.

On Mon, Mar 31, 2008 at 1:19 PM, Matus UHLAR - fantomas

> On 31.03.08 11:59, greg kuechle wrote:
> > I have install bind 9.4.2 on a system with 4 CPUs running RedHat es4. I
> > compiled named with the --enable-threads and used the -n 4 flag when I
> > start named.
> >
> > Mar 31 10:12:24 ******** named[4897]: starting BIND 9.4.2 -t /opt/named
> > -u named -n 4 -c /etc/named.conf
> > Mar 31 16:12:24 ******** named[4897]: found 1 CPU, using 4 worker

> threads
> does your kernel support more CPUs? Seems it does not. Maybe you should
> re-compile or use another (SMP) kernel.
> > Before I upgraded the system it was running an older version of named

> that
> > comes packaged with the OS.
> > Here is the output from the logfile.

> > Mar 24 11:34:13 ******** named[5877]: starting BIND 9.2.4
> > Mar 24 11:34:13 ******** named[5877]: using 4 CPUs

> seems named found 4 CPUs here... you had SMP kernel before the upgrade.
> > Did I compile named wrong?

> the kernel, not the named, imho.
> > Will BIND 9.4.2 use all of the CPUs if I use the -n 4 option at startup?

> No, named will create 4 threads if you use "-n 4", independently on number
> of CPUs in the system. Whether threads will be run on more CPU's, depends
> completely on the kernel. On single-processor kernel everything will use
> just one CPU.
> If you don't use the "-n" switch, named will detect the number of
> processors
> and decide itself, how much threads to start. That's recommended and
> default.
> > It looks like named is only running on one CPU. Will named start using

> the
> > other CPUs once one CPU is up to 100% ?

> I doubt, see above.
> --
> Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
> Warning: I wish NOT to receive e-mail advertising to this address.
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
> The early bird may get the worm, but the second mouse gets the cheese.