From 930719e8767e0a58ca1b57cfbbb2b07b885afd14 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sat, 3 Oct 2015 07:06:49 +0530 Subject: [PATCH] Update the default value for number of UDP listeners (#40761) --- CHANGES | 3 +++ bin/named/main.c | 6 +++--- doc/arm/notes.xml | 6 ++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 1b67eb5abc..839154de16 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4236. [func] Set the default value for the number of UDP listeners + to the number of detected processors (CPU). [RT #40761] + 4235. [func] Added support in named for "dnstap", a fast method of capturing and logging DNS traffic, and a new command "dnstap-read" to read a dnstap log file. Use diff --git a/bin/named/main.c b/bin/named/main.c index bdbbf92102..ccfc7a3adf 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -724,6 +724,8 @@ create_managers(void) { isc_result_t result; unsigned int socks; + INSIST(ns_g_cpus_detected > 0); + #ifdef ISC_PLATFORM_USETHREADS if (ns_g_cpus == 0) ns_g_cpus = ns_g_cpus_detected; @@ -740,10 +742,8 @@ create_managers(void) { if (ns_g_udpdisp == 0) { if (ns_g_cpus_detected == 1) ns_g_udpdisp = 1; - else if (ns_g_cpus_detected < 4) - ns_g_udpdisp = 2; else - ns_g_udpdisp = ns_g_cpus_detected / 2; + ns_g_udpdisp = ns_g_cpus_detected - 1; } if (ns_g_udpdisp > ns_g_cpus) ns_g_udpdisp = ns_g_cpus; diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml index 392b0386f3..ac01c8d5bd 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -663,6 +663,12 @@ transport the query was received over. + + + The default value for the number of UDP listeners has been + changed to the number of detected processors (CPU). + +