mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 00:29:58 -05:00
- 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.
git-svn-id: file:///svn/unbound/trunk@2191 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
0066333685
commit
67c16277ee
4 changed files with 25 additions and 8 deletions
|
|
@ -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
|
10 July 2010: Wouter
|
||||||
- GOST enabled if SSL is recent and ldns has GOST enabled too.
|
- GOST enabled if SSL is recent and ldns has GOST enabled too.
|
||||||
- ldns tarball updated.
|
- ldns tarball updated.
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,9 @@ server:
|
||||||
# outgoing-interface: 2001:DB8::6
|
# outgoing-interface: 2001:DB8::6
|
||||||
|
|
||||||
# number of ports to allocate per thread, determines the size of the
|
# number of ports to allocate per thread, determines the size of the
|
||||||
# port range that can be open simultaneously.
|
# port range that can be open simultaneously. About double the
|
||||||
# outgoing-range: 256
|
# 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
|
# permit unbound to use this port number or port range for
|
||||||
# making outgoing queries, using an outgoing interface.
|
# making outgoing queries, using an outgoing interface.
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,9 @@ sent via a random outgoing interface to counter spoofing.
|
||||||
.TP
|
.TP
|
||||||
.B outgoing\-range: \fI<number>
|
.B outgoing\-range: \fI<number>
|
||||||
Number of ports to open. This number of file descriptors can be opened per
|
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
|
thread. Must be at least 1. Default depends on compile options. Larger
|
||||||
resources from the operating system.
|
numbers need extra resources from the operating system. For performance a
|
||||||
|
a very large value is best, use libevent to make this possible.
|
||||||
.TP
|
.TP
|
||||||
.B outgoing\-port\-permit: \fI<port number or range>
|
.B outgoing\-port\-permit: \fI<port number or range>
|
||||||
Permit unbound to open this port or range of ports for use to send queries.
|
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
|
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
|
(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 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
|
.TP
|
||||||
.B jostle\-timeout: \fI<msec>
|
.B jostle\-timeout: \fI<msec>
|
||||||
Timeout used when the server is very busy. Set to a value that usually
|
Timeout used when the server is very busy. Set to a value that usually
|
||||||
|
|
@ -972,7 +973,7 @@ server:
|
||||||
num\-threads: 1
|
num\-threads: 1
|
||||||
outgoing\-num\-tcp: 1 # this limits TCP service, uses less buffers.
|
outgoing\-num\-tcp: 1 # this limits TCP service, uses less buffers.
|
||||||
incoming\-num\-tcp: 1
|
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\-buffer\-size: 8192 # note this limits service, 'no huge stuff'.
|
||||||
msg\-cache\-size: 100k
|
msg\-cache\-size: 100k
|
||||||
msg\-cache\-slabs: 1
|
msg\-cache\-slabs: 1
|
||||||
|
|
|
||||||
|
|
@ -90,11 +90,20 @@ config_create(void)
|
||||||
cfg->use_syslog = 1;
|
cfg->use_syslog = 1;
|
||||||
cfg->log_time_ascii = 0;
|
cfg->log_time_ascii = 0;
|
||||||
#ifndef USE_WINSOCK
|
#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->outgoing_num_tcp = 10;
|
||||||
cfg->incoming_num_tcp = 10;
|
cfg->incoming_num_tcp = 10;
|
||||||
#else
|
#else
|
||||||
cfg->outgoing_num_ports = 48; /* windows is limited in num fds */
|
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->outgoing_num_tcp = 2; /* leaves 64-52=12 for: 4if,1stop,thread4 */
|
||||||
cfg->incoming_num_tcp = 2;
|
cfg->incoming_num_tcp = 2;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -102,7 +111,6 @@ config_create(void)
|
||||||
cfg->msg_buffer_size = 65552; /* 64 k + a small margin */
|
cfg->msg_buffer_size = 65552; /* 64 k + a small margin */
|
||||||
cfg->msg_cache_size = 4 * 1024 * 1024;
|
cfg->msg_cache_size = 4 * 1024 * 1024;
|
||||||
cfg->msg_cache_slabs = 4;
|
cfg->msg_cache_slabs = 4;
|
||||||
cfg->num_queries_per_thread = 1024;
|
|
||||||
cfg->jostle_time = 200;
|
cfg->jostle_time = 200;
|
||||||
cfg->rrset_cache_size = 4 * 1024 * 1024;
|
cfg->rrset_cache_size = 4 * 1024 * 1024;
|
||||||
cfg->rrset_cache_slabs = 4;
|
cfg->rrset_cache_slabs = 4;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue