How do I identify if bind9 is using 4 cores?

Ondřej Surý ondrej at isc.org
Thu Jul 29 13:11:54 UTC 2021


Hi Petr,

this is a side effect of libuv threadpool which inherits the name of the “parent” thread (but then it’s shared between all of them).

If you use gdb on the `named`, you’ll see that those extra threads are waiting for work in the uv threadpool:

(gdb) bt
#0  futex_wait_cancelable (private=0, expected=0, futex_word=0x7feaf147d22c <cond+44>) at ../sysdeps/nptl/futex-internal.h:186
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7feaf147d1c0 <mutex>, cond=0x7feaf147d200 <cond>) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=cond at entry=0x7feaf147d200 <cond>, mutex=mutex at entry=0x7feaf147d1c0 <mutex>) at pthread_cond_wait.c:638
#3  0x00007feaf146ab19 in uv_cond_wait (cond=cond at entry=0x7feaf147d200 <cond>, mutex=mutex at entry=0x7feaf147d1c0 <mutex>) at ./src/unix/thread.c:780
#4  0x00007feaf1458d4d in worker (arg=0x0) at ./src/threadpool.c:76
#5  0x00007feaf1248ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007feaf114bdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Perhaps somebody might want to fill issue with the libuv, so it resets the internal thread names.

Ondrej
--
Ondřej Surý (He/Him)
ondrej at isc.org

> On 5. 7. 2021, at 10:28, Petr Menšík <pemensik at redhat.com> wrote:
> 
> Consult log of bind9 service. It should autodetect 4 cores without any options, just with plain start of the service.
> 
> It should show isc-socket thread for each core:
> 
> pstree -t $(pidof named)
> 
> I were surprised of my output however, because I have multiple isc-net-000{1}. My version is bind-9.16.18-1.fc34.x86_64
> 
> $ pstree -t $(pidof named)
> named─┬─2*[{isc-net-0000}]
>       ├─5*[{isc-net-0001}]
>       ├─{isc-net-0002}
>       ├─{isc-net-0003}
>       ├─{isc-socket-0}
>       ├─{isc-socket-1}
>       ├─{isc-socket-2}
>       ├─{isc-socket-3}
>       └─{isc-timer}
> 
> Are those numbers intentional?
> 
> On 6/17/21 5:32 AM, Manish Rane wrote:
>> Hi Team,
>> 
>> I have BIND 9.16.17-Ubuntu on ubuntu and have 4 cores. I have configured
>> 
>>  more /etc/default/bind9
>> OPTIONS="-n 4"
>> 
>> And then restarted the services. How do I verify if bind9 has spawned 4
>> processes and distributed among those?
>> 
>> TIA
>> Manish R
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Please visit 
>> https://lists.isc.org/mailman/listinfo/bind-users
>>  to unsubscribe from this list
>> 
>> ISC funds the development of this software with paid support subscriptions. Contact us at 
>> https://www.isc.org/contact/
>>  for more information.
>> 
>> 
>> bind-users mailing list
>> 
>> bind-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-users
> -- 
> Petr Menšík
> Software Engineer
> Red Hat, 
> http://www.redhat.com/
> 
> email: 
> pemensik at redhat.com
> 
> PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
> 
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
> 
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> 
> 
> 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