[Dnsmasq-discuss] why limit cache size to 10000?

Carlos Carvalho carlos at fisica.ufpr.br
Mon Oct 8 22:34:36 BST 2007


Simon Kelley (simon at thekelleys.org.uk) wrote on 8 October 2007 20:58:
 >Carlos Carvalho wrote:
 >> Why is the cache size limited to 10000 in option.c? Just a safety
 >> measure or is there another reason?
 >
 >There used to be a performance limitation. Tuning work to support 500000 
 >names in /etc/hosts has removed that, so it could be at least an order 
 >of magnitude bigger, as long  as you don't mind burning RAM.

Yes, another one for the next update. The limit could also be
documented in the manual, otherwise the user may get confused...

 >I'm not sure if there's much to be gained by going that big: the
 >time-to-live values on most of the net are too short.

I'll check. In the last 1h40 (since last restart) I get "cache size
10000, 0/3462 cache insertions re-used unexpired cache entries". This
means the insertion rate is roughly 2000/h. If the ttl is not short
entries will get overwritten before expiring and the log will show it.



More information about the Dnsmasq-discuss mailing list