<div dir="ltr">Hello, <div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>Cheers, </div><div><br></div><div>Alex.</div><div><br></div><div><br></div><div><div>--- dnsmasq-2.72.orig/src/option.c</div><div>+++ dnsmasq-2.72/src/option.c</div><div>@@ -2364,9 +2364,7 @@</div><div> <span class="" style="white-space:pre">      </span>    </div><div> <span class="" style="white-space:pre">   </span>    if (size < 0)</div><div> <span class="" style="white-space:pre">   </span>      size = 0;</div><div>-<span class="" style="white-space:pre">        </span>    else if (size > 10000)</div><div>-<span class="" style="white-space:pre">   </span>      size = 10000;</div><div>-<span class="" style="white-space:pre">    </span>    </div><div>+<span class="" style="white-space:pre">    </span>   </div><div> <span class="" style="white-space:pre">    </span>    daemon->cachesize = size;</div><div> <span class="" style="white-space:pre">       </span>  }</div><div> <span class="" style="white-space:pre">     </span>break;</div></div><div><br></div><div><br></div><div><br></div><div><br></div></div>