Warning
This page is intended for experienced users only. If you follow these
instructions, you are not protected from footguns elimited with the
introduction of the kres-manager
. However, if you want to continue
using Knot Resolver the same as before the version 6.0.0
this is a chapter
for you.
For new and less experienced users, we recommend using the newer approach starting in the Getting Started chapter.
Process management¶
There following should be taken into consideration when running without systemd:
To utilize multiple CPUs, kresd has to be executed as several independent processes.
Maintenance daemon(s) have to be executed separately.
If a process crashes, it might be useful to restart it.
Using some mechanism similar to Watchdog might be desirable to recover in case a process becomes unresponsive.
Please note, systemd isn’t the only process manager and other solutions exist, such as supervisord. Configuring these is out of the scope of this document. Please refer to their respective documentations.
It is also possible to use kresd without any process management at all, which may be suitable for some purposes (such as low-traffic local / home network resolver, testing, development or debugging).
Garbage Collector¶
Note
When using systemd, kres-cache-gc.service
is enabled by default
and does not need any manual configuration.
Knot Resolver employs a separate garbage collector daemon which periodically
trims the cache to keep its size below size limit configured using
cache.size
.
To execute the daemon manually, you can use the following command to run it every second:
$ kres-cache-gc -c /var/cache/knot-resolver -d 1000