forked from ISTI-ansible-roles/ansible-roles
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
server:
|
|
{% for interface in unbound_interfaces %}
|
|
interface: {{ interface }}
|
|
{% endfor %}
|
|
{% for net in unbound_allowed_clients %}
|
|
access-control: {{ net.cidr }} {{ net.policy }}
|
|
{% endfor %}
|
|
verbosity: {{ unbound_verbosity }}
|
|
# use all CPUs
|
|
num-threads: {{ unbound_threads }}
|
|
|
|
# power of 2 close to num-threads
|
|
msg-cache-slabs: {{ unbound_threads }}
|
|
rrset-cache-slabs: {{ unbound_threads }}
|
|
infra-cache-slabs: {{ unbound_threads }}
|
|
key-cache-slabs: {{ unbound_threads }}
|
|
|
|
# more cache memory, rrset=msg*2
|
|
rrset-cache-size: 100m
|
|
msg-cache-size: 50m
|
|
|
|
# more outgoing connections
|
|
# depends on number of cores: 1024/cores - 50
|
|
outgoing-range: {{ 1024 / unbound_threads - 50 }}
|
|
|
|
# Larger socket buffer. OS may need config.
|
|
so-rcvbuf: 4m
|
|
so-sndbuf: 4m
|
|
|
|
# Faster UDP with multithreading (only on Linux).
|
|
so-reuseport: yes
|
|
# with libevent
|
|
outgoing-range: 8192
|
|
num-queries-per-thread: 4096
|