(no subject)

John Wobus jw354 at cornell.edu
Tue May 27 16:53:15 UTC 2008

If you can solve the problem with more memory, that could be your best
solution.  I used max-cache-size for a while, but eventually discovered
the cache was not actually growing indefinitely.  The problem was that 
needed just a bit more memory for the cache size to stabilize.  This
was not at all evident from the memory-usage statistics we gathered
before the memory upgrade.  But a modest memory upgrade indeed
solved our problem.  I believe that using the max-cache-size also
causes bind to spend more CPU on cache management.

However, I can imagine situations where merely adding
a bit of memory would not be enough.  For example, if someone is doing
some serious spidering using your nameserver, then the eventual
stable cache size could be extremely large.  However I believe there
are people on this list who have very large and diverse user-bases, yet
the cache sizes in their nameservers do stabilize at a reasonable 

Your figure of '2M', though, is very small and suggests you are in
a situation where your resources are very limited.

Bind also uses memory for other functions besides the cache
itself.  If you limit the cache, e.g. to 2M, then I'm guessing
other uses of memory become dominant, and a change, say, between
2M and 10M might not be very visible in terms of memory size.
Some other bind uses of memory might even grow with usage,
in a similar manner to the cache: perhaps someone on this list can
comment on that.  If you really are attempting to run with severely 
resources, possibly other parameters could be adjusted to reduce
memory usage, e.g. number of simultaneous recursive clients

John Wobus

On May 23, 2008, at 5:32 AM, gagadget at free.fr wrote:

> Hello everybody,
> I am running BIND 9.4.2 and I want to limit the cache size of the 
> named process
> because It tends to grow indefinitly.
> In order to do that, I put the following line in global option section 
> :
> max-cache-size 2M ;
> The problem is : this parameter does not seem to work at all because 
> with or
> without it, the size of named is the same. Doing a "rndc dumpdb 
> -cache" show a
> named_dump.db file size of about 60Mb which is much more than 2Mb as 
> set in
> named.conf.
> Am I missing something or the parameter is not used by named ?
> Regards,
> Gael.

More information about the bind-users mailing list