[Dnsmasq-discuss] Many immortals slow down dnsmasq. Bug or expected ?

reiner otto augustus_meyer at yahoo.de
Sat Oct 3 11:20:12 BST 2015


Followin scenario:
dnsmasq runs on embedded system; many (250,000) entries like "address=/abcd/0.0.0.0/" in dnsmasq.conf
Caches in dnsmasq and browser empty.
Now, when browsing to a page with many links to other sites, page load takes more than 10sec.
Clearing browser cache, and reloading the same page, is much faster.

Using dig on the system, running dnsmasq, I see, that first name resolution takes about 400ms.
Second try takes 0ms.

Cache-size set to default or 10,000 makes no difference. cache-size=0 makes dnsmasq unbearable slow, looks like looping somewhere.

Dropping the 250,000 "address=xxx" from dnsmasq.conf, shows fast name resolution (about 25ms) for first try.

In principal, I see same effects on my faster x86-based system.


My conclusions:
Time for cache lookup is not influenced by number of IMMORTALs.
But creating a new entry in cache is badly effected by IMMORTALs.

As creating a new entry assumes checking first, whether same entry exists as IMMORTAL already, which is very like a (fast) cache-lookup, this *should* not have a noticable negative effect.
Which points to a "very slow" insertion of a new entry into hash table.

So, are my observations because of a bug or to be expected ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20151003/61b90e32/attachment.html>


More information about the Dnsmasq-discuss mailing list