Hi,
I am running knot-resolver-5.7.4 in a FreeBSD service jail (14.1-STABLE).
Note: Because I am still pretty new to using knot resolver, I may miss something important
besides [1].
MWN> sum /usr/home/jails/test/var/run/kresd/data.mdb
268 10240 /usr/home/jails/test/var/run/kresd/data.mdb
MWN> ./_STATS [2]
cache('['count_entries']'): 4953
cache('['usage_percent']'): 16.953125
### stopping jail simulates shutdown server [3]:
MWN> service jail stop test
Stopping jails: test.
MWN> sum /usr/home/jails/test/var/run/kresd/data.mdb
268 10240 /usr/home/jails/test/var/run/kresd/data.mdb
### Thus, data.mdb is preserved after shutdown!
### starting jail simulates booting server:
MWN> service jail start test
Starting jails: test.
MWN> sum /usr/home/jails/test/var/run/kresd/data.mdb
15059 10240 /usr/home/jails/test/var/run/kresd/data.mdb
MWN> ./_STATS
cache('['count_entries']'): 87
cache('['usage_percent']'): 0.15625
1) After having stopped that jail, data.mdb is still available and hasn't been
modified as shown by checksum.
2) After start of the jail including start of kresd data.mdb has been modified
(checksum).
3) cache.stats() shows significantly lower numbers.
Questions:
#) become cache.stats() reset after a reboot?
#) what am I missing?
Thanks in advance and regards,
Michael
[1]
https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html#p…
[2] _STATS (based on
https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html#c…)
echo -n "cache('['count_entries']'): " ; echo
"cache.stats()" | nc -NU /var/run/kresd/control/kresd.sock | grep count_entries
echo -n "cache('['usage_percent']'): " ; echo
"cache.stats()" | nc -NU /var/run/kresd/control/kresd.sock | grep usage_percent
[3] a real server reboot shows the same issue with the cache