What's new

Local DNS Cache

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Elmer

Senior Member
So, I ran across this article:

https://www.rootusers.com/how-to-configure-local-dns-query-cache-in-linux/

Just for giggles I decided to take a look at dnsmasq.conf, which is in /etc on the Asus router, and sure enough, there was a cache parameter and it was set to 1500 (which must be a default?). Can this parameter be safely raised to the 5000 level as the article suggests, and does this cache play nicely with DoT?
 
Look at your own cache statistics. When we've looked at changing this parameter before it was found that 1500 is more than enough. Increasing it serves no purpose other than reducing your available memory.

The article you linked to is unrealistic for a home setup because it was doing 30 million lookups a day!
 
Look at your own cache statistics. When we've looked at changing this parameter before it was found that 1500 is more than enough. Increasing it serves no purpose other than reducing your available memory.

The article you linked to is unrealistic for a home setup because it was doing 30 million lookups a day!
I think that fact is irrelevant.
 
I think that fact is irrelevant.
It's very relevant. Cached DNS entries expire after a short period of time, typically 300 seconds. So even if you had a cache size of 100 GB a typical home setup would still only ever be caching a few hundred at any one time. The rest of the cache would be wasted resource that could be used elsewhere.
 
Cache usage is typically lower than people expect, due to TTLs causing entries to expire generally quickly enough. You can check your cache usage:

Code:
killall -SIGUSR1 dnsmasq && tail /tmp/syslog.log -n 6

A few years ago I did a small survey on the forums, and nobody was able to fill up all 1500 entries.
 
Cache usage is typically lower than people expect, due to TTLs causing entries to expire generally quickly enough. You can check your cache usage:

Code:
killall -SIGUSR1 dnsmasq && tail /tmp/syslog.log -n 6

A few years ago I did a small survey on the forums, and nobody was able to fill up all 1500 entries.

So, can that setting be reduced for improved responsiveness or ...??


Sent from my iPhone using Tapatalk
 
No. We're talking microseconds here at most...

Don’t tell me that: I’m a “mind the pennies and the pounds take care of themselves” kind of guy.


Sent from my iPhone using Tapatalk
 
in that analogy we're talking about 1/1000000 th of a penny

That doesn’t help: my subconscious is greedy. It’s screaming “gimme gimme gimme” as I’m typing this.


Sent from my iPhone using Tapatalk
 
ok, good luck with saving up enough to buy something in a dollar store in this lifetime :)

I guess that depends on how much I call upon DNS to find things for me, doesn’t it?

(Y’all are right, I know, but sometimes I can’t help myself. Right now it’s the caffeine talking)


Sent from my iPhone using Tapatalk
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top