summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-02-11 01:43:59 -0600
committerChris Buechler <cmb@pfsense.org>2015-02-11 01:45:00 -0600
commitb3aacd59285dab48b1ee5cc081da2224b48051c0 (patch)
treeda0adaf59cb0939dd289ad0fd56052fa35c652f7 /etc/inc/unbound.inc
parent24cbfd5a63dd86707a565a3e975616ff9fec2ebd (diff)
downloadpfsense-b3aacd59285dab48b1ee5cc081da2224b48051c0.zip
pfsense-b3aacd59285dab48b1ee5cc081da2224b48051c0.tar.gz
rrset-cache-size should == 2 * msg-cache-size. Ticket #4367
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index 0a4a805..bf7f285 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -74,9 +74,6 @@ function unbound_optimization() {
$optimization['infra_cache_slabs'] = "infra-cache-slabs: {$optimize_num}";
$optimization['key_cache_slabs'] = "key-cache-slabs: {$optimize_num}";
- // Size of the RRset cache
- $optimization['rrset_cache_size'] = "rrset-cache-size: 8m";
-
/*
* Larger socket buffer for busy servers
* Check that it is set to 4MB (by default the OS has it configured to 4MB)
@@ -258,6 +255,9 @@ EOD;
} else
$forward_conf = "";
+ // Size of the RRset cache == 2 * msg-cache-size per Unbound's recommendations
+ $rrset_cache_size = $msg_cache_size * 2;
+
$unboundconf = <<<EOD
##########################
# Unbound Configuration
@@ -297,6 +297,8 @@ cache-max-ttl: {$cache_max_ttl}
cache-min-ttl: {$cache_min_ttl}
harden-dnssec-stripped: {$harden_dnssec_stripped}
msg-cache-size: {$msg_cache_size}m
+rrset-cache-size: {$rrset_cache_size}m
+
{$optimization['number_threads']}
{$optimization['msg_cache_slabs']}
{$optimization['rrset_cache_slabs']}
OpenPOWER on IntegriCloud