[Dnsmasq-discuss] Any plans on adding ability to store cachetodisk?
terminatorul at gmail.com
Tue May 15 21:09:11 BST 2012
Nicholas Weaver wrote:
> On May 15, 2012, at 10:46 AM, Timothy Madden wrote:
>> Exactly why should the recursive resolver have the site in its cache for
>> the entire TTL of the site name ?
> Because memory is cheap, so early eviction of data is not going to be all
> that common. And if memory is expensive, a simple LRU algorithm is going
> to keep the cache generally good for the stuff you'd fetch from the cache.
>> And if it happens not to have it, a new lookup costs about 2 seconds in
>> my case.
> If a new lookup costs you 2s, but the TCP RTT resulting from the lookup is
> <200ms, there is something wrong with either your network or the recursive
> resolver you are configured to use, as there is no reason a DNS lookup
> should take ~10 RTTs to complete.
> In which case, I'd personally switch to Google Public DNS (22.214.171.124 and
> 126.96.36.199), which is aggressively anycasted, currently has a good privacy
> policy (yes, shocker), and doesn't manipulate DNS results.
> If a new lookup costs you 2s, but the TCP connect resulting from the
> lookup takes >500ms (e.g. you're using a satellite link), Amdahl's law
> ensures that the latency for the DNS is going to be in the noise compared
> to the latency you are going to experience due to the high RTT for the TCP
A second lookup only takes 1ms as my dig output shows, so the RTT is no
But as you can see my ISP DNS provider is horribly slow, and I bet my entire
country (which happens to be Romania) has this problem, since there are only
2 big ISP companies here, and I used them both until now. And I live the
capital city (Bucharest).
So for this reason, I would like to get the most possible of my DNS cache,
including to save the cache on disk at shutdown, so I can reboot without
fear that my internet will feel slow again because of that.
And you were right, using
dig @188.8.131.52 ...
returned about 54ms for www.loveparty.ch, and 38 for www.google.ro, which is
so, so fast for me! But than again I would not like to just count on that
(an external DNS provider), instead of setting up my own cache. Besides,
with a good cache I do not need the external DNS provider, right ?
More information about the Dnsmasq-discuss