Maintained by: NLnet Labs

[Unbound-users] Uneven distribution of queries between threads/processes

W.C.A. Wijngaards
Wed Feb 15 10:32:30 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Attila,

On 02/15/2012 10:26 AM, Attila Nagy wrote:
> Well, I haven't read all the code, instead I ask. Unbound
> comm_point_create_udp_ancil sets the callback, which I assume is 
> called when a new activity happens on the listening socket. But who
> does this load balancing in a multi-threaded environment in this 
> specific case? FreeBSD's kqueue, by having multiple entities
> (threads, their callbacks) on the notification list? libev, which
> subscribes once and handles the threads? Or the socket code?

It is the FreeBSD kqueue, with multiple threads or processes listening
to a socket registered in multiple kqueues, and calls their callbacks.
 Likely the FreeBSD scheduler and network code is involved.  Perhaps
also the interrupt code in FreeBSD (the network card interrupts).

Best regards,
   Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPO3uuAAoJEJ9vHC1+BF+N7pAP/jiLA7JS5LjZiXByE9DCAp6C
yWROSdMRnN93QwDm3kdJlz0A+aOaQ8tWu6UfgRB4zOeoPW7JPVJiyzeJjizHtuJz
KI0KqhIva1oXY4IC0YQQCWS4S3FsYWZ8pdRrpbMAdXhT6nXNHMCo9oZGh6XT7A9s
JW4cebmV6N0ndapuKJzj6ixUCqC975Yx9pgZCtghJ+IQMEYs2vJWIBpJpvWrY0S3
crj2lFJ6gu0wz/WojJThiSseWKLoylUx9ieuUdwSIFlm5qInDXNnGRfLvuOw56Dd
AVx6/1VsVM/UMVTCvJfe1qpsBeThW5gwfjdQwfP8KPBSB09FAr+gstZzF1nvhzBH
CG2MwjnyJ4642D/1QsQXu0M3NpDEuubgRubrUEz+xaCv8SvKZkGEiGmf9Iii/Roy
EfmoWG1gTnrP1K++lVtaEGLvlTG7lTPqbnhn1kI/sHIcCciQBYoTDbvTo/tw2OkV
VaRrut2Ze4Cb+xlin0Bc4G2KmkG7+XwUqSoVx2X71MCqGaWsjekB3cwziiIyL7xT
h4CaZibbh6uOnEC+eIBEBpN0iroLkZpkLErom3whZYmx85/uEmvKdC/VejiR6rnU
FP+X9WVt1akmQ/w5EsruJp10YaZPn0/V+O/xZGaBzq24m7D4y0wazUHAv85prZuo
nKLm7RLoeLd0srSjqTrX
=SInM
-----END PGP SIGNATURE-----