2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

[master] adjust default -U

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]
This commit is contained in:
Evan Hunt
2014-02-19 21:54:43 -08:00
parent 4a0beb64be
commit 83eecff731
3 changed files with 18 additions and 6 deletions

View File

@@ -646,8 +646,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