diff options
-rw-r--r-- | ci/respdiff/kresd.config | 3 | ||||
-rw-r--r-- | daemon/bindings/cache.rst | 4 | ||||
-rw-r--r-- | etc/config/config.cluster | 6 | ||||
-rw-r--r-- | etc/config/config.isp | 4 | ||||
-rw-r--r-- | etc/config/config.splitview | 4 |
5 files changed, 8 insertions, 13 deletions
diff --git a/ci/respdiff/kresd.config b/ci/respdiff/kresd.config index 7da2eaa4..583822b1 100644 --- a/ci/respdiff/kresd.config +++ b/ci/respdiff/kresd.config @@ -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 diff --git a/daemon/bindings/cache.rst b/daemon/bindings/cache.rst index c14cbcfd..eeadb6fc 100644 --- a/daemon/bindings/cache.rst +++ b/daemon/bindings/cache.rst @@ -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): diff --git a/etc/config/config.cluster b/etc/config/config.cluster index 1fbc0b84..d8c6c702 100644 --- a/etc/config/config.cluster +++ b/etc/config/config.cluster @@ -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 = { diff --git a/etc/config/config.isp b/etc/config/config.isp index bf9d65c8..7d00131b 100644 --- a/etc/config/config.isp +++ b/etc/config/config.isp @@ -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 diff --git a/etc/config/config.splitview b/etc/config/config.splitview index 04b47edb..f2b7cd05 100644 --- a/etc/config/config.splitview +++ b/etc/config/config.splitview @@ -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` |