[Dnsmasq-discuss] Removing the hard limit on cache size

Alexandro Olivares Acosta aoa141 at gmail.com
Sun Nov 1 02:57:07 GMT 2015


Hello,

I used to have a Bind9 forwarding server on my local student network (about
150 concurrent clients) and for some reason it gives SERVFAILs pretty
often. I tried dnsmasq and worked fine for a while but I noticed the
behavior that after running a couple of hours, it slows down. So my idea
was on the cache size being too small.

I patched the source as below, now being able to set the cache size to 1
million entries. I have been testing it on my local networks and the result
is pretty noticeable. I now have a fast cache forwarder able to handle my
150 concurrent users.

I know that dnsmasq is meant for routers and truly is simple and great
software, but for sysadmins, we would appreciate the ability to set larger
limits. I have 7 physical servers and all of them have at least 16GB of
RAM. The cache with 1 million entries uses only 106 MB of RAM. We used to
have a mikrotik router but replaced it with a Dell PowerEdger server
because the mikrotik it could not handle the load and could not do proper
load balancing. Now the network works smoothly with an 8 core
server+Debian+squid load balancing. This fast large dnscache cache with my
patched dnsmasq was the last nice addition to it.

Cheers,

Alex.


--- dnsmasq-2.72.orig/src/option.c
+++ dnsmasq-2.72/src/option.c
@@ -2364,9 +2364,7 @@

     if (size < 0)
       size = 0;
-    else if (size > 10000)
-      size = 10000;
-
+
     daemon->cachesize = size;
   }
  break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20151031/295ef035/attachment.html>


More information about the Dnsmasq-discuss mailing list