<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Date: Thu, 1 Apr 2021 22:11:17 -0400<br>
From: "Neal P. Murphy" <<a href="mailto:neal.p.murphy@alum.wpi.edu" target="_blank">neal.p.murphy@alum.wpi.edu</a>><br>
To: <a href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
Subject: Re: [Dnsmasq-discuss] Partial denial of service with dnsmasq<br>
        on resource constrained systems<br>
Message-ID: <20210401221117.47313352@playground><br>
Content-Type: text/plain; charset=US-ASCII<br>
<br>
On Thu, 1 Apr 2021 23:55:08 +0100<br>
Simon Kelley <<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>> wrote:<br>
<br>
> > <br>
> > One other thing I saw while testing with large blocklists was a noticeable<br>
> > latency increase, likely related to lookup times. I recall some discussion<br>
> > on the ML where you mentioned work on a hash/tree solution was in<br>
> > progress. Were those changes completed?<br>
> >   <br>
> <br>
> <br>
> This seems to be the crucial aspect here: large blocklists. Is we move<br>
> the large blocklists to a subsystem designed to handle them, then the<br>
> problem goes away.<br>
> <br>
> I could do with a handle on exactly how people are configuring dnsmasq<br>
> to do ad blocking. It's not something I have much experience of.<br>
<br>
On Smoothwall Express, I've conf'ed dnsmasq to 'undefine' a large number of FQDNs using the form 'local=/<a href="http://8teenporno.com/" rel="noreferrer" target="_blank">8teenporno.com/</a>' I pull the Shalla data and use the ads, pron, warez, and a few other categories.<br>
<br>
768 000 FQDNs makes dnsmasq use around 100MiB of RAM. On an Atom N270 running SWE, response time is generally in the range of 75 ms to 100 ms when there's no traffic. With the DL saturated (using <a href="http://speedtest.net" rel="noreferrer" target="_blank">speedtest.net</a>), response times range from 500ms to 2s. Saturated UL doesn't seem to affect response time much.<br>
<br>
I've been satisfied with its operation; I see almost no ads and pretty much nothing in the other categories I use.<br>
<br>
N<br><br></blockquote><div>This is still about 130 bytes per FQDN, sounds like a lot for the RAM usage.</div><div><br></div><div>The key issue to me with large lists, is that addn-hosts etc can be reloaded by SIGHUP and dnsmasq can be restarted very quickly which is fine, however when  you have large conf files with many --local or --address lines, a full dnsmasq restart is required and it can take seconds or minutes which is very bad when you need update the blocklists. </div><div><br></div><div>It will be nice for local/address/cname lines be parsed just like the addn-host files, i.e. with a SIGHUP they can be quickly parsed and used instead of being part of  the full blown dnsmasq.conf for a time consuming parsing.</div><div><br></div><div>Gordon</div></div></div>