diff --git a/CHANGES b/CHANGES
index 261c8e3a9c..16a2a255d5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3751. [tuning] The default setting for the -U option (setting
+ the number of UDP listeners per interface) has
+ been adjusted to improve performance. [RT #35417]
+
3747. [bug] A race condition could lead to a core dump when
destroying a resolver fetch object. [RT #35385]
diff --git a/bin/named/main.c b/bin/named/main.c
index 1d844e03e3..55a371ff9e 100644
--- a/bin/named/main.c
+++ b/bin/named/main.c
@@ -621,8 +621,14 @@ create_managers(void) {
#ifdef WIN32
ns_g_udpdisp = 1;
#else
- if (ns_g_udpdisp == 0)
- ns_g_udpdisp = ns_g_cpus_detected;
+ 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;
+ }
if (ns_g_udpdisp > ns_g_cpus)
ns_g_udpdisp = ns_g_cpus;
#endif
diff --git a/bin/named/named.docbook b/bin/named/named.docbook
index 1f08e196e0..bb5ae01e80 100644
--- a/bin/named/named.docbook
+++ b/bin/named/named.docbook
@@ -291,10 +291,12 @@
Use #listeners
worker threads to listen for incoming UDP packets on each
address. If not specified, named will
- use the number of detected CPUs. If
- has been set to a higher value than the number of CPUs,
- then may be increased as high as that
- value, but no higher.
+ calculate a default value based on the number of detected
+ CPUs: 1 for 1 CPU, 2 for 2-4 CPUs, and the number of
+ detected CPUs divided by 2 for values higher than 4.
+ If has been set to a higher value than
+ the number of detected CPUs, then may
+ be increased as high as that value, but no higher.