AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

DNS caching and DNS query statistics.

Open MasterArmory opened this issue 5 years ago • 21 comments

DNS Caching: This is helpful in speeding up requests. If it's currently implemented, I am not aware of it.

DNS Query Statistics: This is a feature form PiHole. On the dashboard, I would like to see a pie chart of where my DNS resolutions are originating. As a bouns, the average response time from each source would also be good to know.

Thank you.

MasterArmory avatar Mar 06 '20 14:03 MasterArmory

This is helpful in speeding up requests. If it's currently implemented, I am not aware of it.

It is, there are no stats, though.

This is a feature form PiHole. On the dashboard, I would like to see a pie chart of where my DNS resolutions are originating. As a bouns, the average response time from each source would also be good to know.

Could you please explain what exact stats on this pie chart would you like to see?

ameshkov avatar Mar 06 '20 14:03 ameshkov

Could you please explain what exact stats on this pie chart would you like to see?

Yes, I would like to see the total for responses for each DNS Server used and the cache. For example: If I have 200 DNS lookups.
I would like to see a chart showing:

  • 85 came from the cache
  • 62 came from 9.9.9.9
  • 50 came from 1.1.1.1
  • 3 came from 8.8.8.8

Extra credit if the pie chart or graph also showed the average response time for each DNS Server.

  • 85 came from the cache -Agv. 10ms
  • 62 came from 9.9.9.9 -Avg. 100ms
  • 50 came from 1.1.1.1 -Avg. 32ms
  • 3 came from 8.8.8.8 -Avg. 24ms

MasterArmory avatar Mar 06 '20 14:03 MasterArmory

I think it doesn't have dns caching because i can't find it listed as a feature, it is better if you add stats or status in the query if it cached or not and response time like in the PiHole. Thanks

ariqmuhammadt avatar Mar 14 '20 23:03 ariqmuhammadt

Well, it's just so basic that listing it as a feature would be strange.

Currently, you can configure just the DNS cache size: https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#configuration-file

ameshkov avatar Mar 16 '20 09:03 ameshkov

Those statistics would be a great addition! It would be nice if we could also see what was in the cache.

alexiri avatar Apr 14 '20 16:04 alexiri

+1 for cache stats: hits, misses, eviction because of TTL vs no room in cache, etc. It helps with cache sizing also to see how the cache is being used.

timkgh avatar Sep 13 '21 15:09 timkgh

Stats per upstream would be very useful also. There's "Average processing time" but I would like to see numbers per upstream.

timkgh avatar Sep 21 '21 15:09 timkgh

我也需要这个功能

yuxuan0107 avatar Jan 22 '22 15:01 yuxuan0107

Also +1 for more etailed stats. At the moment I am blind concernning relevant settings like TTL data, cache size usage (percentage of cache hits) or different dns servers reaction times, amount of requests sent to the dns servers or even cache usage (percentage of the assigned memory)

becks0815 avatar Apr 11 '22 09:04 becks0815

The DNS pie chart would also give insights into how the weighted load balancing algorithm is working.

My AGH is configured with multiple upstream providers like so, and racing them against each other using Parallel Requests.

# NextDNS
45.90.28.0
45.90.30.0
# Cloudflare (with enhanced Security)
1.1.1.2
1.0.0.2
# Quad 9 (with ECS)
9.9.9.11
149.112.112.11
# Google
8.8.8.8
8.8.4.4

Through the query log I can see that NextDNS is winning most of the time, but I'd like a visualisation with percentage breakdown on the home screen.

adrianmace avatar Jul 05 '22 05:07 adrianmace

+1 on this. It would be nice to have simple cache stats on the dashboard. Cache hits % is mostly useful to see how effective the cache is for the time period displayed.

ely105 avatar Mar 09 '23 17:03 ely105

+1 on this

Kani3D avatar Mar 15 '23 20:03 Kani3D

I want to see this too... On the dashboard page...

Upstream DNS Server Requestes Avg
Cached 12522 2ms
tls://1.1.1.1 9855 19ms
https://1.1.1.1/query 5578 16ms
8.8.8.8 452 33ms

https://github.com/AdguardTeam/AdGuardHome/issues/2013

peepsnet avatar Apr 08 '23 21:04 peepsnet

It's now past three (3) years since this request was raised 😂😂😂😂

gyCfjSnO avatar Apr 09 '23 00:04 gyCfjSnO

Upstream statistics added in v0.107.37.

schzhn avatar Sep 08 '23 15:09 schzhn

@schzhn, there are still cache statistics to figure out.

ainar-g avatar Sep 08 '23 15:09 ainar-g

@ainar-g It would also be useful to add stats for parental_block_host and safebrowsing_block_host response times under "Average processing time".

timkgh avatar Sep 10 '23 16:09 timkgh

@timkgh, I'm not entirely sure what you mean, but please make a separate feature request about that.

ainar-g avatar Sep 11 '23 10:09 ainar-g

@timkgh, I'm not entirely sure what you mean, but please make a separate feature request about that.

If "browsing security" and "parental control" are enabled in "General settings", then standard-block.dns.adguard.com and family-block.dns.adguard.com are used for these features, via DNS queries. The Dashboard UI should also show DNS stats for these 2 servers, in the "Average processing time" card. I think it's relevant in this issue as it also relates to DNS stats.

timkgh avatar Sep 11 '23 13:09 timkgh

Need to hit cache stats.

zgqq avatar Jul 11 '24 06:07 zgqq

I would love to see the cache hit/miss ratio in the API. Especially useful combined with my other LAN stats in Home Assistant.

fvdm avatar Jun 05 '25 17:06 fvdm

Cache hit rate will be nice, at least overall: "Served from cache %".

webysther avatar Jul 04 '25 14:07 webysther

i'd love to have cache stats

Plopaplopa avatar Jul 11 '25 21:07 Plopaplopa