Skip to content
Snippets Groups Projects
Verified Commit de2be793 authored by Tomas Krizek's avatar Tomas Krizek
Browse files

doc: document cache garbage collector

parent 31c19bfc
No related branches found
No related tags found
No related merge requests found
Pipeline #49278 failed
This commit is part of merge request !817. Comments created here will be created in the context of that merge request.
......@@ -10,6 +10,7 @@ Improvements
- lua modules may omit casting parameters of layer functions (!797)
- lua tables for C modules are more strict by default, e.g. `nsid.foo`
will throw an error instead of returning `nil` (!797)
- experimental cache garbage collector daemon is available (!817)
Bugfixes
--------
......
......@@ -613,6 +613,30 @@ For more details, see ``kresd.systemd(7)``.
.. note:: On recent Linux supporting ``SO_REUSEPORT`` (since 3.9, backported to RHEL 2.6.32) it is also able to bind to the same endpoint and distribute the load between the forked processes. If your OS doesn't support it, use only one daemon process.
Cache Garbage Collector
=======================
.. warning:: Garbage collector is experimental and subject to change in future
releases. This feature isn't currently turned on by default.
By default, kresd uses the available cache until it's full. When more space is
required, the entire cache is dropped. To avoid starting over with an empty
cache, a separate garbage collector daemon is available to periodically trim
the cache instead.
The cache garbage collector daemon (``kr_cache_gc``) monitors the cache usage
and attempts to free up space when a threshold is reached. To spawn the daemon
and configure it to run every minute, use:
.. code-block:: bash
$ kr_cache_gc -c /var/cache/knot-resolver -d 60000
It's also possible to run this under systemd. However, a dedicated systemd unit
is not currently part of the upstream package. See `message#167`_ on our
mailing list for an example of such a unit file.
Using CLI tools
===============
......@@ -665,3 +689,4 @@ Code reference
.. _`real process managers`: http://blog.crocodoc.com/post/48703468992/process-managers-the-good-the-bad-and-the-ugly
.. _`socket activation`: http://0pointer.de/blog/projects/socket-activation.html
.. _`dnsproxy module`: https://www.knot-dns.cz/docs/2.7/html/modules.html#dnsproxy-tiny-dns-proxy
.. _`message#167`: https://lists.nic.cz/pipermail/knot-resolver-users/2019/000167.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment