On Dec 23, 2010, at 9:03 AM, Andreas Schulze wrote:

> I'm faced with the question if my unbound's cachesize is large enough.
> 
> The ideal size is reached, if unbound discards entries from the cache
> *only if* their ttl was expired.
> 
> Could anybody recommend a testplan, which values should be measured?



When dealing with the cache you should take the following into account:

* MSG cache contains packet data and meta data with pointers to the RRsets in 
the RR Cache

* RR Cache contains RRsets

* Cache entries are removed only when needed: Caches will grow to their maximum 
size. (Unbound will not do any pro-active cleanup).

If you use 'prefetch' you will keep the cache populated with popular requests.

Setting the RR cache about twice MSG cache is reasonable but if you really want 
to know what the optimal setting is in your environment you should turn on 
extended statistics and feed them into munin. By flushing the cache and 
assessing how the message and RRset cache grow you can estimate the ratio 
between the two.


For example see the image from munin below. You should take the estimate from 
the area where the memory is still not saturated (where the blue line is still 
rising, you see that the RRset cache size need is a little more than twice the 
message cache size need). You can also see that the RRset cache is saturated 
while the Message cache is still growing. This is an indication that the RRset 
cache is configured sub-optimal. If they saturate at more or less the same 
point the ratio is optimal.

Hope this helps.

--Olaf



<<inline: unbound_munin_memory-day.png>>

________________________________________________________ 

Olaf M. Kolkman                        NLnet Labs
                                       Science Park 140, 
http://www.nlnetlabs.nl/               1098 XG Amsterdam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Unbound-users mailing list
[email protected]
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users

Reply via email to