From 4039647930bf6b9832319a36014a9ef6f2f02cea Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sat, 3 Oct 2015 07:13:00 +0530 Subject: [PATCH] Update the default value for number of UDP listeners (#40761) (cherry picked from commit 930719e8767e0a58ca1b57cfbbb2b07b885afd14) --- CHANGES | 5 +++++ bin/named/main.c | 6 +++--- doc/arm/notes.xml | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 51800751f0..48c83f0392 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +4236. [func] On machines with 4 or more processors (CPU), the + default value for the number of UDP listeners + has been changed to the number of detected + processors minus one. [RT #40761] + 4233. [test] Add tests for CDS and CDNSKEY with delegation-only. [RT #40597] diff --git a/bin/named/main.c b/bin/named/main.c index d951ef5021..408a5ca14d 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -705,6 +705,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; @@ -721,10 +723,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 d7eedea74a..23b9a92fc7 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -210,6 +210,13 @@ transport the query was received over. + + + On machines with 4 or more processors (CPU), the default value + for the number of UDP listeners has been changed to the number + of detected processors minus one. + +