]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Changed the defaults for num-queries-per-thread/outgoing-range.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 12 Jul 2010 13:59:39 +0000 (13:59 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 12 Jul 2010 13:59:39 +0000 (13:59 +0000)
         For builtin-select: 512/960, for libevent 1024/4096 and for
         windows 24/48 (because of win api).  This makes the ratio this way
         to improve resilience under heavy load.  For high performance, use
         libevent and possibly higher numbers.

git-svn-id: file:///svn/unbound/trunk@2191 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
doc/example.conf.in
doc/unbound.conf.5.in
util/config_file.c

index 3056fc8417632d689f102ce139390322e205c866..6cd29fd152a55ff3ecdc9fbc8253eaba60d06b4a 100644 (file)
@@ -1,3 +1,10 @@
+12 July 2010: Wouter
+       - Changed the defaults for num-queries-per-thread/outgoing-range.
+         For builtin-select: 512/960, for libevent 1024/4096 and for
+         windows 24/48 (because of win api).  This makes the ratio this way
+         to improve resilience under heavy load.  For high performance, use
+         libevent and possibly higher numbers.
+
 10 July 2010: Wouter
        - GOST enabled if SSL is recent and ldns has GOST enabled too.
        - ldns tarball updated.
index 4a0652278495389e1d231928e2d36ae3c49195d4..ae5556e785a2d92a1b5c7d1f3b21b8c3dbc3cab5 100644 (file)
@@ -54,8 +54,9 @@ server:
        # outgoing-interface: 2001:DB8::6
 
        # number of ports to allocate per thread, determines the size of the
-       # port range that can be open simultaneously. 
-       # outgoing-range: 256
+       # port range that can be open simultaneously.  About double the
+       # num-queries-per-thread, or, use as many as the OS will allow you.
+       # outgoing-range: 4096
 
        # permit unbound to use this port number or port range for
        # making outgoing queries, using an outgoing interface.
index 614bd4f1948deb5948f24dcae0526f1a7b5d5f3e..f75ebc97e8a9d327543c39273692b3af6c7350f4 100644 (file)
@@ -141,8 +141,9 @@ sent via a random outgoing interface to counter spoofing.
 .TP
 .B outgoing\-range: \fI<number>
 Number of ports to open. This number of file descriptors can be opened per 
-thread. Must be at least 1. Default is 256. Larger numbers need extra 
-resources from the operating system.
+thread. Must be at least 1. Default depends on compile options. Larger 
+numbers need extra resources from the operating system.  For performance a
+a very large value is best, use libevent to make this possible.
 .TP
 .B outgoing\-port\-permit: \fI<port number or range>
 Permit unbound to open this port or range of ports for use to send queries.
@@ -205,7 +206,7 @@ The number of queries that every thread will service simultaneously.
 If more queries arrive that need servicing, and no queries can be jostled out
 (see \fIjostle\-timeout\fR), then the queries are dropped. This forces
 the client to resend after a timeout; allowing the server time to work on
-the existing queries. Default 1024.
+the existing queries. Default depends on compile options, 512 or 1024.
 .TP
 .B jostle\-timeout: \fI<msec>
 Timeout used when the server is very busy.  Set to a value that usually
@@ -972,7 +973,7 @@ server:
        num\-threads: 1
        outgoing\-num\-tcp: 1   # this limits TCP service, uses less buffers.
        incoming\-num\-tcp: 1
-       outgoing\-range: 16     # uses less memory, but less performance.
+       outgoing\-range: 60     # uses less memory, but less performance.
        msg\-buffer\-size: 8192   # note this limits service, 'no huge stuff'.
        msg\-cache\-size: 100k
        msg\-cache\-slabs: 1
index a406ac97001b74aa2863ab860168f1e819ef76bd..39c18379ce92a30f96fd9be32a686bddcac2c76e 100644 (file)
@@ -90,11 +90,20 @@ config_create(void)
        cfg->use_syslog = 1;
        cfg->log_time_ascii = 0;
 #ifndef USE_WINSOCK
-       cfg->outgoing_num_ports = 256;
+#  ifdef USE_MINI_EVENT
+       /* select max 1024 sockets */
+       cfg->outgoing_num_ports = 960;
+       cfg->num_queries_per_thread = 512;
+#  else
+       /* libevent can use many sockets */
+       cfg->outgoing_num_ports = 4096;
+       cfg->num_queries_per_thread = 1024;
+#  endif
        cfg->outgoing_num_tcp = 10;
        cfg->incoming_num_tcp = 10;
 #else
        cfg->outgoing_num_ports = 48; /* windows is limited in num fds */
+       cfg->num_queries_per_thread = 24;
        cfg->outgoing_num_tcp = 2; /* leaves 64-52=12 for: 4if,1stop,thread4 */
        cfg->incoming_num_tcp = 2; 
 #endif
@@ -102,7 +111,6 @@ config_create(void)
        cfg->msg_buffer_size = 65552; /* 64 k + a small margin */
        cfg->msg_cache_size = 4 * 1024 * 1024;
        cfg->msg_cache_slabs = 4;
-       cfg->num_queries_per_thread = 1024;
        cfg->jostle_time = 200;
        cfg->rrset_cache_size = 4 * 1024 * 1024;
        cfg->rrset_cache_slabs = 4;