[Dnsmasq-discuss] DNSMasq slow.

Chris Green cl at isbd.net
Thu Oct 1 09:40:34 BST 2020


On Wed, Sep 30, 2020 at 09:41:58PM -0400, Ken D'Ambrosio wrote:
> Hi, all.  I've got a RasPi 4, with 4 GB of mostly empty RAM, acting as my
> firewall/gateway, with DHCP and DNSMasq running.  And performance of it
> is... odd.  E.g., I have an entry in /etc/hosts on the Pi that I figured
> would be served nearly instantly, since no external lookup is required, and,
> out of ten lookups from the same host that sits on the common network, I
> range from about .2 seconds to 7.  (Note that it seems to fluctuate
> throughout the lookups, not just faster after the first lookup fills the
> cache or anything.)  Lookups for hosts not in /etc/hosts seem to be roughly
> as long as well.
> 
> Not sure how to troubleshoot this.  Any suggestions would be greatly
> appreciated.
> 
Are you sure the query gets as far as your Pi running dnsmasq
immediately?  I have had ongoing issues with systemd-resolved on Linux
hosts where it causes all sorts of issues before the query even gets
sent off the originating system (or at least sends incorrect queries
before the correct one).

It's also worth looking at the dnsmasq syslog entries on the Pi for
the period the query takes, my problem with systemd-resolved was
initially diagnosed from there.

In the end I've disabled systemd-resolved on all my systems as, with
DNS on a fast LAN and not many clients, it's really not needed.

There's a couple of quite long threads here about the delays I saw amd
systemd-resolved, probably in the last 12 months or so.

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list