Shibby Tomato Dnsmasq

Discussion in 'Tomato Firmware' started by Michael51, May 4, 2016.

  1. Michael51

    Michael51 New Member Member

    I tried changing the cache size with cache-size=1024 I have the dir868l so it has enough ram but as soon as I added it to the configuration the router froze up and became really laggy and then DNS wasn't working. So I had to go back and remove the command and it was almost immediately fixed. I did it through the router GUI. My main point is that I'd like to increase the cache size but I'm not sure what's wrong
  2. koitsu

    koitsu Network Guru Member

    Discussed here:

    People using the dnsmasq Custom Configuration section should really be examining what /etc/dnsmasq.conf has in place beforehand. dnsmasq does not like it when you put an identical directive in the file twice (the end result will be dnsmasq not starting, and because the daemon handles DNS and DHCP, it's quite important).
  3. leandroong

    leandroong LI Guru Member

    this is what I did to change cache size from my padavan firmware.
    From "Run after Firewall Rules Restarted:",
    sed -i 's/cache-size=1024/cache-size=0/g' /etc/dnsmasq.conf
    killall dnsmasq

    Note: cache size reduce to 0 since I'm using unbound as replacement
  4. pegasus123

    pegasus123 Addicted to LI Member

    ^ i think there is command service dnsmasq restart.
  5. leandroong

    leandroong LI Guru Member

    I know, I just pasted what I used in my padavan FW.
  6. jerrm

    jerrm Network Guru Member

    None of these sed tricks will work reliably with Tomato!!!!!!!!!

    dnsmasq.conf is regenerated with every service restart.
  7. koitsu

    koitsu Network Guru Member

    You shouldn't need to tweak cache-size anyway. Guess why?

      675 nobody     912 S    dnsmasq -c 1500 --log-async
    TomatoUSB runs dnsmasq with the -c flag, argument 1500, which correlates with cache-size (reference). In other words: it's already set to a value even larger than 1024.

    Footnote: the killall + /usr/sbin/dnsmasq "relaunch" would break this functionality.
  8. Beast

    Beast Network Guru Member

    I place this in the Dnsmasq Custom configuration


    Been running it that way for years on my RT-N16. Using Toastman builds, maybe Shibby's are way diffrent? dnsmasq[2190]: started, version 2.73 cachesize 8192
    Techie007 likes this.
  9. jerrm

    jerrm Network Guru Member

    This is a problem that creeped into the multi-wan releases 135+.

    A few releases ago, @shibby20 very briefly applied a contributed patch that added a cache-size directive to dnsmasq.conf. After realizing the change broke the ability to customize the parameter in the custom options field, shibby reverted to the tried-and-true method. It appears the change back to the traditional method never got applied to multi-wan branch.

    Now that multi-wan has merged into the main tree, the issue is back.

    It was originally discussed in here:
    visceralpsyche and koitsu like this.
  10. koitsu

    koitsu Network Guru Member

    Thanks @jerrm -- this absolutely explains it.
  11. leandroong

    leandroong LI Guru Member

    I don't know and have not tested it on tomato since my primary router is padavan FW. Anyway, here is proof that it works on padavan FW
  12. Yhazarus

    Yhazarus Network Newbie Member

    sorry for the up thread but i see cat /etc/dnsmasq.conf and there is nothing about cache-size, I put it on dnsmasq configuration file, I need cache at maximum ,at 10000, and when shibby removed that i don't know what happens,is size the mqximum ever? or depends of other tips in config, how can i use cache-size=10000 if not appears
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice