Report information
The Basics
Id:
35857
Status:
resolved
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
9.11.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
9.11.0
Priority:
(no value)
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
System Tools
Area:
bug

Attachments
0001-Add-lwres-options-for-setting-number-of-workers-and-.patch

Dates
Created:Mon, 28 Apr 2014 09:35:54 -0400
Updated:Wed, 02 Aug 2017 20:53:08 -0400
Closed:Wed, 22 Oct 2014 13:54:45 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: Hardcoded number of handled clients in LWRESD
Date: Mon, 28 Apr 2014 09:35:51 -0400 (EDT)
To: bind-suggest@isc.org
From: Tomas Hozza <thozza@redhat.com>
Hello. When using lwresd, the number of clients that can be handled seems to be hard-coded in the bin/named/lwresd.c (lines 63-67): ... /*! * The total number of clients we can handle will be NTASKS * NRECVS. */ #define NTASKS 2 /*%< tasks to create to handle lwres queries */ #define NRECVS 2 /*%< max clients per task */ ... Is there any specific reason for this? Would you be OK with having a configuration option(s) in the 'lwres' statement that would enable setting the NTASKS/NRECVS to a different value? Do you have any specific requirements on how such options should be named? Should there be any (maximum) limit for the values? I can work on a patch once I get your response. Thank you in advance. Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer Experience PGP: 1D9F3C2D Red Hat Inc. http://cz.redhat.com
CC: undisclosed-recipients: ;
Subject: Re: [ISC-Bugs #35857] Hardcoded number of handled clients in LWRESD
Date: Mon, 28 Apr 2014 16:58:52 +0000
To: Tomas Hozza via RT <bind-suggest@isc.org>
From: Evan Hunt <each@isc.org>
Hi Tomas, > Is there any specific reason for this? Would you be OK with having > a configuration option(s) in the 'lwres' statement that would > enable setting the NTASKS/NRECVS to a different value? No, there's no particular reason for that. The lightweight resolver never got much widespread adoption, so it's been neglected. (Nobody uses it -> nobody complains about it -> we don't fix broken things. You know how it goes.) We've actually considered deprecating it, and may yet do so, but in the meantime I'd be happy to accept your patch. There's a system test in bin/tests/system/lwresd that might be an appropriate place for any regression tests you wish to add. Documentation goes in chapter 5 of the ARM: doc/arm/Bv9ARM-book.xml. > Do you have any specific requirements on how such options should > be named? I would suggest they include "lwres", to clarify that these options only affect lightweight resolver tasks. I might use "lwres-tasks" and "lwres-clients", for instance, with "lwres-tasks" defaulting to ns_g_cpus (the number of CPUs, potentially overridden by the '-n' option). Clients would then be evenly divided amongst the tasks. Up to you, though. > Should there be any (maximum) limit for the values? Well, at some point you'd hit system resource limits. Offhand, I'd suggest putting the maximum at 32768 clients, and default to 1024. Perhaps consider using a lower default when running as named and a higher one when running as lwresd. The way clients work in lwresd is, unfortunately, broken and stupid. In named, when it's necessary to recurse to answer a client query, the ns_client object that handled the incoming query will replace itself so that if more queries come in while it's recursing, there will be another ns_client object there to handle them. The lwd_client objects used for the lightweight resolver don't do this. If you get them all busy doing recursion, all incoming queries are starved. If we don't end up deprecating LWD, then one of these days we really ought to combine its client-management code with ns_client. -- Evan Hunt -- each@isc.org Internet Systems Consortium, Inc.
Subject: Re: [ISC-Bugs #35857] Hardcoded number of handled clients in LWRESD
Date: Wed, 30 Apr 2014 16:38:07 -0400 (EDT)
To: bind-suggest@isc.org
From: Tomas Hozza <thozza@redhat.com>
Hi Evan. Thank you for your reply and advices. ----- Original Message ----- > Hi Tomas, > > > Is there any specific reason for this? Would you be OK with having > > a configuration option(s) in the 'lwres' statement that would > > enable setting the NTASKS/NRECVS to a different value? > > No, there's no particular reason for that. The lightweight resolver > never got much widespread adoption, so it's been neglected. (Nobody > uses it -> nobody complains about it -> we don't fix broken things. > You know how it goes.) > > We've actually considered deprecating it, and may yet do so, > but in the meantime I'd be happy to accept your patch. There's a > system test in bin/tests/system/lwresd that might be an appropriate > place for any regression tests you wish to add. Documentation > goes in chapter 5 of the ARM: doc/arm/Bv9ARM-book.xml. I implemented the new options and added documentation (which may require some polishing. However I can not think of any use-case that I can add into regression tests for those new options. If you have some idea I can add some. > > Do you have any specific requirements on how such options should > > be named? > > I would suggest they include "lwres", to clarify that these options > only affect lightweight resolver tasks. I might use "lwres-tasks" > and "lwres-clients", for instance, with "lwres-tasks" defaulting to > ns_g_cpus (the number of CPUs, potentially overridden by the '-n' > option). Clients would then be evenly divided amongst the tasks. > Up to you, though. > > > Should there be any (maximum) limit for the values? > > Well, at some point you'd hit system resource limits. Offhand, I'd > suggest putting the maximum at 32768 clients, and default to 1024. > Perhaps consider using a lower default when running as named and a > higher one when running as lwresd. I followed your advices and added appropriate default/maximum values. Please see the commit message. > The way clients work in lwresd is, unfortunately, broken and stupid. > In named, when it's necessary to recurse to answer a client query, the > ns_client object that handled the incoming query will replace itself > so that if more queries come in while it's recursing, there will be > another ns_client object there to handle them. The lwd_client > objects used for the lightweight resolver don't do this. If you get > them all busy doing recursion, all incoming queries are starved. > If we don't end up deprecating LWD, then one of these days we really > ought to combine its client-management code with ns_client. > > -- > Evan Hunt -- each@isc.org > Internet Systems Consortium, Inc. If you see anything in my patch that could be improved, please let me know. Thank you! Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer Experience PGP: 1D9F3C2D Red Hat Inc. http://cz.redhat.com

Message body is not shown because sender requested not to inline it.

Subject: Re: [ISC-Bugs #35857] Hardcoded number of handled clients in LWRESD
Date: Mon, 12 May 2014 03:04:56 -0400 (EDT)
To: bind-suggest@isc.org
From: Tomas Hozza <thozza@redhat.com>
----- Original Message ----- > Hi Evan. > > Thank you for your reply and advices. > > ----- Original Message ----- > > Hi Tomas, > > > > > Is there any specific reason for this? Would you be OK with having > > > a configuration option(s) in the 'lwres' statement that would > > > enable setting the NTASKS/NRECVS to a different value? > > > > No, there's no particular reason for that. The lightweight resolver > > never got much widespread adoption, so it's been neglected. (Nobody > > uses it -> nobody complains about it -> we don't fix broken things. > > You know how it goes.) > > > > We've actually considered deprecating it, and may yet do so, > > but in the meantime I'd be happy to accept your patch. There's a > > system test in bin/tests/system/lwresd that might be an appropriate > > place for any regression tests you wish to add. Documentation > > goes in chapter 5 of the ARM: doc/arm/Bv9ARM-book.xml. > > I implemented the new options and added documentation (which may require > some polishing. However I can not think of any use-case that I can add > into regression tests for those new options. If you have some idea I > can add some. > > > > Do you have any specific requirements on how such options should > > > be named? > > > > I would suggest they include "lwres", to clarify that these options > > only affect lightweight resolver tasks. I might use "lwres-tasks" > > and "lwres-clients", for instance, with "lwres-tasks" defaulting to > > ns_g_cpus (the number of CPUs, potentially overridden by the '-n' > > option). Clients would then be evenly divided amongst the tasks. > > Up to you, though. > > > > > Should there be any (maximum) limit for the values? > > > > Well, at some point you'd hit system resource limits. Offhand, I'd > > suggest putting the maximum at 32768 clients, and default to 1024. > > Perhaps consider using a lower default when running as named and a > > higher one when running as lwresd. > > I followed your advices and added appropriate default/maximum values. > Please see the commit message. > > > The way clients work in lwresd is, unfortunately, broken and stupid. > > In named, when it's necessary to recurse to answer a client query, the > > ns_client object that handled the incoming query will replace itself > > so that if more queries come in while it's recursing, there will be > > another ns_client object there to handle them. The lwd_client > > objects used for the lightweight resolver don't do this. If you get > > them all busy doing recursion, all incoming queries are starved. > > If we don't end up deprecating LWD, then one of these days we really > > ought to combine its client-management code with ns_client. > > > > -- > > Evan Hunt -- each@isc.org > > Internet Systems Consortium, Inc. > > If you see anything in my patch that could be improved, please let me know. > > Thank you! > > Regards, > -- > Tomas Hozza > Software Engineer - EMEA ENG Developer Experience > > PGP: 1D9F3C2D > Red Hat Inc. http://cz.redhat.com Hello. I would like to ask you for a feedback for the patch I sent you last time, so I can proceed with it, or fix found issues. Thanks! Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer Experience PGP: 1D9F3C2D Red Hat Inc. http://cz.redhat.com
CC: undisclosed-recipients: ;
Subject: Re: [ISC-Bugs #35857] Hardcoded number of handled clients in LWRESD
Date: Mon, 12 May 2014 14:47:14 +0000
To: Tomas Hozza via RT <bind-suggest@isc.org>
From: Evan Hunt <each@isc.org>
> I would like to ask you for a feedback for the patch I sent you > last time, so I can proceed with it, or fix found issues. Apologies -- I haven't forgotten it, but was much distracted by the 9.10.0 release (and the subsequent patch). I'll respond more substantively within the next few days.
3852. [func] Increase the default number of clients available for servicing lightweight resolver queries, and make them configurable via the "lwres-tasks" and "lwres-clients" options. (Thanks to Tomas Hozza.) [RT #35857] 9.11.0 We should consider increasing the defaults, but not adding the new options, to previous releases.