]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc/cache: add note explaining cache size choice
authorTomas Krizek <tomas.krizek@nic.cz>
Tue, 28 Jan 2020 14:38:37 +0000 (15:38 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 29 Jan 2020 10:32:17 +0000 (11:32 +0100)
ci/respdiff/kresd.config
daemon/bindings/cache.rst
etc/config/config.cluster
etc/config/config.isp
etc/config/config.splitview

index 7da2eaa4bc0ac4d1f2f8097a6b79bd9a4503854c..583822b1e156fea83cdc3708fed62e8ce0719729 100644 (file)
@@ -7,9 +7,6 @@ net.ipv6=false
 -- Auto-maintain root TA
 trust_anchors.add_file('.local/etc/knot-resolver/root.keys')
 
--- Large cache size, so we don't need to flush often
--- This can be larger than available RAM, least frequently accessed
--- records will be paged out
 cache.size = 1024 * MB
 
 -- Load Useful modules
index c14cbcfd2ca2205fe0d0cb395685b91c82361742..eeadb6fcfc75119eebef9f6142aaf03ed170e3e6 100644 (file)
@@ -20,6 +20,10 @@ For personal and small office use-cases cache size around 100 MB is more than en
 For large deployments we recommend to run Knot Resolver on a dedicated machine,
 and to allocate 90% of machine's free memory for resolver's cache.
 
+.. note:: Choosing a cache size that can fit into RAM is important even if the
+   cache is stored on disk (default). Otherwise, the extra I/O caused by disk
+   access for missing pages can cause performance issues.
+
 For example, imagine you have a machine with 16 GB of memory.
 After machine restart you use command ``free -m`` to determine
 amount of free memory (without swap):
index 1fbc0b84dbdf91e7e3aaf0da244153a5f86531b4..d8c6c702311dc8f5b1a16dab6fdedba029cd4b03 100644 (file)
@@ -11,10 +11,8 @@ net.listen('::1', 53, { kind = 'dns'})
 net.listen('127.0.0.1', 853, { kind = 'tls' })
 net.listen('::1', 853, { kind = 'tls' })
 
--- Large cache size, so we don't need to flush ever
--- This can be larger than available RAM, least frequently accessed
--- records will be paged out as long as there's enough disk space to back it
-cache.size = 100 * GB
+-- Refer to manual for optimal cache size
+cache.size = 16 * GB
 
 -- Load Useful modules
 modules = {
index bf9d65c847c72527fde29404acae3472aacaad69..7d00131b355a1fd8d790787d3d50cd7c202bd2ff 100644 (file)
@@ -8,9 +8,7 @@ net.listen('::1', 53, { kind = 'dns'})
 net.listen('127.0.0.1', 853, { kind = 'tls' })
 net.listen('::1', 853, { kind = 'tls' })
 
--- Large cache size, so we don't need to flush often
--- This can be larger than available RAM, least frequently accessed
--- records will be paged out
+-- Refer to manual for optimal cache size
 cache.size = 4 * GB
 
 -- load modules
index 04b47edb6e671dc54862de0fd79904009d12c8bf..f2b7cd055b8e92d6396c4449920bba6f9e43e21d 100644 (file)
@@ -22,9 +22,7 @@ modules = {
        dns64 = 'fe80::21b:77ff:0:0',
 }
 
--- Large cache size, so we don't need to flush often
--- This can be larger than available RAM, least frequently accessed
--- records will be paged out
+-- Refer to manual for optimal cache size
 cache.size = 4 * GB
 
 -- Forward everything below `company.cz` to `192.168.1.3`