Hi,
I would like to ask for an initial review of a patch to add 2
additional statistic entries to the stats command.
This is not a final patch, just a quick&dirty proof of concept.
Rationale for this is that I want to measure the cache size in a
defined interval for charting. I've been doing dump_cache and working
on that, but that blocks the resolver for quite a while. With my
current cache sizes it's up to 13 seconds. I want something quicker.
I thought I do a patch that does the counting in a way as dump_cache
would, but do not produce output, just count.
Is that the proper way to do it?
Best regards,
Maciej Soltysiak
(attachments)
unbound-msg-rrset-cache-size.diff (3.49 KB)
hey,
Rationale for this is that I want to measure the cache size in a
defined interval for charting. I've been doing dump_cache and working
on that, but that blocks the resolver for quite a while. With my
current cache sizes it's up to 13 seconds. I want something quicker.
+1 for this.
It would also make sense to expose statistics for infra/key/negative-cache as well.
Hi,
It would also make sense to expose statistics for infra/key/negative-cache
as well.
Thanks for the suggestion. I can easily do infra and key. I'll dig
more about neg-cache.
And I actually found a better (and quicker) way to do it than in the
previous patch.
Instead of iterating through all the entries, I will use the count
stored in size_t num in struct lruhash.
I'll implement that, clean up and propose a better patch soon.
--
tarko
Maciej