Unbound: add more cusomisable fields to the server template.

This commit is contained in:
Andrea Dell'Amico 2019-07-17 12:37:43 +02:00
parent fd8c325d8e
commit 4f08e78d87
2 changed files with 19 additions and 8 deletions

View File

@ -18,3 +18,14 @@ unbound_threads: '{{ ansible_processor_count }}'
unbound_remote_control: 'yes'
unbound_remote_IP: '127.0.0.1'
unbound_rrset_cache_size: 100m
unbound_rrset_msg_cache_size: 50m
# Larger socket buffer. OS may need config.
unbound_so_rcvbuf: 4m
unbound_so_sndbuf: 4m
# Faster UDP with multithreading (only on Linux).
unbound_so_reuseport: 'yes'
# with libevent
unbound_outgoing_range: 8192
unbound_num_queries_per_thread: 4096

View File

@ -21,22 +21,22 @@ server:
key-cache-slabs: {{ unbound_threads }}
# more cache memory, rrset=msg*2
rrset-cache-size: 100m
msg-cache-size: 50m
rrset-cache-size: {{ unbound_rrset_cache_size }}
msg-cache-size: {{ unbound_rrset_msg_cache_size }}
# more outgoing connections
# depends on number of cores: 1024/cores - 50
outgoing-range: {{ 1024 / unbound_threads - 50 }}
outgoing-range: {{ 1024 // unbound_threads - 50 }}
# Larger socket buffer. OS may need config.
so-rcvbuf: 4m
so-sndbuf: 4m
so-rcvbuf: {{ unbound_so_rcvbuf }}
so-sndbuf: {{ unbound_so_sndbuf }}
# Faster UDP with multithreading (only on Linux).
so-reuseport: yes
so-reuseport: {{ unbound_so_reuseport }}
# with libevent
outgoing-range: 8192
num-queries-per-thread: 4096
outgoing-range: {{ unbound_outgoing_range }}
num-queries-per-thread: {{ unbound_num_queries_per_thread }}
{% if ansible_service_mgr == 'systemd' %}
use-systemd: yes
do-daemonize: no