From e448fe9f2e541b13806e834ea2f7a8b6fa2e35e1 Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Thu, 17 Mar 2022 11:56:27 -0400 Subject: [PATCH] defaults: Increase number of ports and queries per thread As per performance recommendations with libevent: https://unbound.docs.nlnetlabs.nl/en/latest/topics/performance.html?highlight=libevent#using-libevent Signed-off-by: Kyle Harding --- rootfs_overlay/etc/unbound/unbound.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rootfs_overlay/etc/unbound/unbound.conf b/rootfs_overlay/etc/unbound/unbound.conf index 1c52dda..cc18016 100644 --- a/rootfs_overlay/etc/unbound/unbound.conf +++ b/rootfs_overlay/etc/unbound/unbound.conf @@ -113,4 +113,17 @@ server: # have write permission. auto-trust-anchor-file: /etc/unbound/root.key + # Number of ports to open. This number of file descriptors can be opened per thread. + # Must be at least 1. Default depends on compile options. Larger numbers need extra + # resources from the operating system. For performance a very large value is best, + # use libevent to make this possible. + outgoing-range: 8192 + + # 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 jostle-timeout), + # 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 depends on + # compile options, 512 or 1024. + num-queries-per-thread: 4096 + include: /etc/unbound/a-records.conf