Adgaurd home connection stalled with high latency for DNS queries

I am self-hosting adguard home on my FreeBSD server. My client PC use this endpoint for DNS resolving.

The response time from adguard home is extremely high (more than 3 sec). However if I try querying the DNS locally, the response time is within 400ms. The adgaurd home dashboard is also showing an average 120ms latency for DNS resolving.

I am using Chromium Network inspection to check the DNS query to my adguard home service and seeing the large portion of latency is called "Network Stalled". I suspect there is some sort of rate limiting or TCP connection queueing happening at my FreeBSD home server. I does verify adguard home settings that there is NO rate limiting.

Weird part is, if I run adguard home (same version) on a Linux VM in the my FreeBSD server, there is no network stalled and latency is averagely 150ms.

Also I learn that adguard home is basically a byproduct of dnsmasq. So I run dnsmasq with the same upstream DNS server and adblock list, the latency is pretty low (about 100ms).

So what could be wrong with adguard home?

UPDATE:

Made following change and fix the problem:

Code:
/etc/resolv.conf

nameserver 127.0.0.1

The adguardhome Jail nameserver should just point to its localhost instead of the router since the router also points the nameserver back to this Jail.
 
Last edited:
So I run dnsmasq with the same upstream DNS server and adblock list, the latency is pretty low (about 100ms).
So you found the solution I use. Not much different than PiHole.

cd /usr/local/etc/dnsmasq.d

fetch https://raw.githubusercontent.com/hagezi/dns-blocklists/main/dnsmasq/ultimate.txt

service dnsmasq restart

Not to be rude but who cares why Adguard is so slow. You found the ultimate solution.
 
So you found the solution I use. Not much different than PiHole.

Yeah, I start using dnsmasq + unbound for few days. I am using the pro plus list from that same repo. Performance-wise is no brainer for me and pretty surprising how lightweight it should be. The CPU usage compared to adguard home is about 1:10, and never exceeds 0.2% of WCPU.

I always have a weak spot for the fancy dashboard... giving me piece of mind to see the DNS blocking is working, so still missing that part of adguard home.

adguard home is written in Golang, so it should have the same performance cross-platform. Not sure why in FreeBSD, it has this latency issue.
 
Back
Top