Hi,

Chris Stromsoe wrote:
> On Tue, 18 Jan 2005, Mark Andrews wrote:
>
>
>> You have datasize (hard limit) and max-cache-size (soft limit)
>> both set to 20M. datasize is there to raise the default limit
>> if it is too low. max-cache-size is there to restrict the
>> amount of memory used by the cache.

>
>
> I have a similar memory usage issue with 9.2.4. I have max-cache-size set
> to 250M. After all the zones are loaded, bind uses approximately 500M.
> datasize is not set. I'm loading ~800 zones. After a week of running,
> bind swells to ~ 1.5G. rndc dumpdb gives me a 58M file.
>
> ~36 hours after starting, rndc dumpdb gives me a 58M dump file, and ps
> shows:
>
> cbs:~ > ps axu|egrep "^(USER|named)"
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> named 11918 0.0 68.0 1070096 702688 ? S Jan17 0:00 /usr/local/bind-9.2.4/sbin/named -u named -n 2
> named 11919 0.0 68.0 1070096 702688 ? S Jan17 0:00 /usr/local/bind-9.2.4/sbin/named -u named -n 2
> named 11920 5.7 68.0 1070096 702688 ? S Jan17 91:46 /usr/local/bind-9.2.4/sbin/named -u named -n 2
> named 11921 5.7 68.0 1070096 702688 ? S Jan17 91:57 /usr/local/bind-9.2.4/sbin/named -u named -n 2
> named 11922 0.0 68.0 1070096 702688 ? S Jan17 0:11 /usr/local/bind-9.2.4/sbin/named -u named -n 2
> named 11923 0.8 68.0 1070096 702688 ? S Jan17 13:05 /usr/local/bind-9.2.4/sbin/named -u named -n 2
>

ok, this is ~1GB
Bind with local zones uses 500M, plus 250M cache gives 750M

>
> options {
> version "x";
> directory "/usr/local/etc/named";
>
> dump-file "/var/run/named/named_dump.db";
> pid-file "/var/run/named/named.pid";
> statistics-file "/var/run/named/named.stats";
>
> transfer-format many-answers;
> max-cache-size 250M;
> };
>
>
> How "soft" a soft limit is max-cache-size? Even allowing for other
> allocations, growth 750M past the max-cache-size doesn't strike me as
> right. Is there anything that would prevent bind from expiring entries
> from the cache even with max-cache-size set? The system is running Linux,
> Debian stable, kernel 2.4. bind was compiled locally. Any ideas where to
> look?
>

Do you use views?
max-cache-size is a limit per view.


Guido