mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
3214. [func] Add 'named -U' option to set the number of UDP
listener threads per interface. [RT #26485]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
3214. [func] Add 'named -U' option to set the number of UDP
|
||||
listener threads per interface. [RT #26485]
|
||||
|
||||
3213. [doc] Clarify ixfr-from-differences behavior. [RT #25188]
|
||||
|
||||
3212. [bug] rbtdb.c: failed to remove a node from the deadnodes list
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: globals.h,v 1.91 2011/06/17 23:47:49 tbox Exp $ */
|
||||
/* $Id: globals.h,v 1.92 2011/11/09 18:44:04 each Exp $ */
|
||||
|
||||
#ifndef NAMED_GLOBALS_H
|
||||
#define NAMED_GLOBALS_H 1
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
EXTERN isc_mem_t * ns_g_mctx INIT(NULL);
|
||||
EXTERN unsigned int ns_g_cpus INIT(0);
|
||||
EXTERN unsigned int ns_g_udpdisp INIT(0);
|
||||
EXTERN isc_taskmgr_t * ns_g_taskmgr INIT(NULL);
|
||||
EXTERN dns_dispatchmgr_t * ns_g_dispatchmgr INIT(NULL);
|
||||
EXTERN isc_entropy_t * ns_g_entropy INIT(NULL);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: interfacemgr.c,v 1.100 2011/10/04 16:04:22 each Exp $ */
|
||||
/* $Id: interfacemgr.c,v 1.101 2011/11/09 18:44:03 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -268,7 +268,7 @@ ns_interface_listenudp(ns_interface_t *ifp) {
|
||||
attrmask |= DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP;
|
||||
attrmask |= DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6;
|
||||
|
||||
ifp->nudpdispatch = ISC_MIN(ns_g_cpus, MAX_UDP_DISPATCH);
|
||||
ifp->nudpdispatch = ISC_MIN(ns_g_udpdisp, MAX_UDP_DISPATCH);
|
||||
for (disp = 0; disp < ifp->nudpdispatch; disp++) {
|
||||
result = dns_dispatch_getudp_dup(ifp->mgr->dispatchmgr,
|
||||
ns_g_socketmgr,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.c,v 1.184 2011/11/05 00:45:31 each Exp $ */
|
||||
/* $Id: main.c,v 1.185 2011/11/09 18:44:03 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -418,7 +418,7 @@ parse_command_line(int argc, char *argv[]) {
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"46c:C:d:E:fFgi:lm:n:N:p:P:"
|
||||
"sS:t:T:u:vVx:")) != -1) {
|
||||
"sS:t:T:U:u:vVx:")) != -1) {
|
||||
switch (ch) {
|
||||
case '4':
|
||||
if (disable4)
|
||||
@@ -527,6 +527,11 @@ parse_command_line(int argc, char *argv[]) {
|
||||
fprintf(stderr, "unknown -T flag '%s\n",
|
||||
isc_commandline_argument);
|
||||
break;
|
||||
case 'U':
|
||||
ns_g_udpdisp = parse_int(isc_commandline_argument,
|
||||
"number of UDP listeners "
|
||||
"per interface");
|
||||
break;
|
||||
case 'u':
|
||||
ns_g_username = isc_commandline_argument;
|
||||
break;
|
||||
@@ -585,6 +590,12 @@ create_managers(void) {
|
||||
#else
|
||||
ns_g_cpus = 1;
|
||||
#endif
|
||||
if (ns_g_udpdisp == 0 || ns_g_udpdisp > ns_g_cpus)
|
||||
ns_g_udpdisp = ns_g_cpus;
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
|
||||
ISC_LOG_INFO, "using %u UDP listener%s per interface",
|
||||
ns_g_udpdisp, ns_g_udpdisp == 1 ? "" : "s");
|
||||
|
||||
result = isc_taskmgr_create(ns_g_mctx, ns_g_cpus, 0, &ns_g_taskmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
|
@@ -18,7 +18,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named.docbook,v 1.26 2009/10/05 17:30:49 fdupont Exp $ -->
|
||||
<!-- $Id: named.docbook,v 1.27 2011/11/09 18:44:03 each Exp $ -->
|
||||
<refentry id="man.named">
|
||||
<refentryinfo>
|
||||
<date>May 21, 2009</date>
|
||||
@@ -69,6 +69,7 @@
|
||||
<arg><option>-s</option></arg>
|
||||
<arg><option>-S <replaceable class="parameter">#max-socks</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-U <replaceable class="parameter">#listeners</replaceable></option></arg>
|
||||
<arg><option>-u <replaceable class="parameter">user</replaceable></option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-V</option></arg>
|
||||
@@ -281,6 +282,20 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-U <replaceable class="parameter">#listeners</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <replaceable class="parameter">#listeners</replaceable>
|
||||
worker threads to listen for incoming UDP packets on each
|
||||
address. If not specified, <command>named</command> will
|
||||
use all of the worker threads for this purpose; the
|
||||
<option>-U</option> option allows the number to be
|
||||
decreased but not increased.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-u <replaceable class="parameter">user</replaceable></term>
|
||||
<listitem>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.629 2011/11/07 00:14:10 marka Exp $ */
|
||||
/* $Id: server.c,v 1.630 2011/11/09 18:44:03 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -6982,6 +6982,7 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text) {
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
"CPUs found: %u\n"
|
||||
"worker threads: %u\n"
|
||||
"UDP listeners per interface: %u\n"
|
||||
#endif
|
||||
"number of zones: %u\n"
|
||||
"debug level: %d\n"
|
||||
@@ -6994,7 +6995,7 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text) {
|
||||
"server is up and running",
|
||||
ns_g_version, ob, alt, cb,
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
ns_g_cpus_detected, ns_g_cpus,
|
||||
ns_g_cpus_detected, ns_g_cpus, ns_g_udpdisp,
|
||||
#endif
|
||||
zonecount, ns_g_debuglevel, xferrunning, xferdeferred,
|
||||
soaqueries, server->log_queries ? "ON" : "OFF",
|
||||
|
Reference in New Issue
Block a user