AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

optimistic dns caching

Open densu90 opened this issue 1 year ago • 3 comments

Prerequisites

Platform (OS and CPU architecture)

FreeBSD, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On a router, DHCP is handled by the router

AdGuard Home version

v0.107.44

Action

optimistic dns caching enabled, dns cache size doubled, minimal ttl 60 seconds (maximal ttl is empty)

Expected result

expecting of reduction of latency for all dns requests after first resolution

Actual result

one request of 20 or 30 on average resolves es expected (under 10 ms) all else obviously requests each time clients request it

Additional information and/or screenshots

No response

densu90 avatar Feb 06 '24 15:02 densu90

We cannot reproduce that, see screenshot. Note that the amount of flitering rules as well as response time from the parental-control and safe-browsing services will affect the precise numbers. If you still think there is a bug, please inspect the query log, especially whether or not the (served from cache) mark is set, and try a different upstream, as some upstreams have known issues with cacheability.

Screenshot at 2024-02-06 19-17-21

ainar-g avatar Feb 06 '24 16:02 ainar-g

hi sorry for delay i had small misunderstanding of situation. after experimentation i discovered next: apparently, dns cache works per client. not for all clients in network: there is performance issue when any filter list enabled. pretext os:opnsense, cpu:3cores, ram:5gb, 4 interfaces wan included, 3 interfaces bounded to Adguard (without wan), dns sources:local unbound on Opnsense + 3 (https://dns10.quad9.net/dns-query 8.8.8.8 1.1.1.1). if i use unbound i have up to 2 sec of delay in browser: Uploading unbound only - 2sec.png… if i use adguard without any blocklist enabled it will be same-ish but, if i use any blocklist it will become 8+sec on browser end before page starts to load: Uploading like 8sec to resolve.png… if on page several sources present it adds up quickly, page may just hang with blank content (due to timeout i believe) by "any blocklist" i am serious, any blocklist. if i will enable "Dandelion Sprout's Game Console Adblock List" only, which is tiny, i will get 8+ seconds in browser. if i add all blocklists in the menu it will it will work same-ish as with one enabled. from Adguerd statistics point of view situation looks like good: Uploading only 90ms on Adguard side.png… ps: i had reinstalled Adguard several days before in hope it will help. and i was very vigilant to make sure that yaml config file not existing before install. configured by hands after installation from screech.

densu90 avatar Feb 07 '24 18:02 densu90

something went wrong :) inoreader-like working per host like 8sec to resolve only 90ms on adguard side unbound only - 2sec

densu90 avatar Feb 07 '24 18:02 densu90