v 9.10.3 max-cache-size not recognised

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

v 9.10.3 max-cache-size not recognised

MAYER Hans

 

Dear Users,

 

I have a low end server with 1 GB of RAM running GNU/Linux version 3.4.104. I noticed that after a certain time the swap space is extensively used. This is normally not an issue but sometimes the system has long response times. I noticed that “named” is using a lot of memory. So I add the following lines in the options section of bind.conf

 

        max-cache-size 629145600 ;

        cleaning-interval 120 ;         // 2 hours

        max-cache-ttl 14400 ;           // 4 hours

        max-ncache-ttl 14400 ;          // 4 hours

 

But this does not help. I thought that bind would not use much more than 600 kB, but this is not true. When I look with “top” I see

 

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND

32470 bind      20   0  982m 842m 2260 S   0.0 86.8 175:55.22 named

 

As you can see “named” is using 842 MB physical and 982 MB virtual memory. Much more than configured.

 

On this server I have bind version

BIND 9.10.3 <id:2799933>

built by make with '--enable-shared' '--enable-static' '--enable-ipv6' '--with-openssl' 'CC=gcc' 'LDFLAGS=-L/usr/lib/arm-linux-gnueabihf'

compiled by GCC 4.6.3

 

On a different system ( same kernel version, same HW ) I am using BIND 9.9.5

Here I never noticed this issue.

 

Is there a major change for memory management in version 9.10 ?

Are there any other methods to reduce memory consumption for bind ?

 

Kind regards

Hans

 

 

 

 

 


_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: v 9.10.3 max-cache-size not recognised

Phil Mayers
On 04/01/16 13:54, MAYER Hans wrote:

> As you can see “named” is using 842 MB physical and 982 MB virtual
> memory. Much more than configured.

Well, bind will use memory for things other than cache.

Try accessing the statistics XML channel over HTTP with a browser; it'll
render to HTML via stylesheet, and show you memory context usage. Have a
look and see what stands out.

FWIW, max-cache-size works fine for us on 9.10.2-P4, and limits it to
the appropriate value. We see this reflected in RSS as well.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

RE: v 9.10.3 max-cache-size not recognised

MAYER Hans

Hi Phil

Many thanks for your reply.

> Try accessing the statistics XML channel over HTTP with a browser

With this statistics XML channel I have my pain.
Based on the documentation at ftp://ftp.isc.org/isc/bind9/cur/9.10/doc/arm/Bv9ARM.pdf I tried different URL's. But I always get only some few lines which are very long. But no formatted information. I tried different browsers ( IE, Chrome, FF ) but always the same. Not really something what I can read.

If I try this specific URL (for example) from the command line:
curl http://localhost:18080/xml/v3/mem 2> /dev/null | xml2
I get about  1800 readable lines. ( It also works with FQDN instead of localhost )
But how to interpret this information ?

> ... max-cache-size works fine for us on 9.10.2-P4 ...

This is also my experience. With an older version I don't have issues that bind uses too much of memory.


Kind regards from Mayer to Mayers  :-)
Hans


--

This is the output of BIND 9.10.3-P2, which is currently restarted ( because of a new installation )

# curl http://localhost:18080/xml/v3/mem 2> /dev/null | xml2 | grep -i use
/statistics/memory/contexts/context/inuse=130439916
/statistics/memory/contexts/context/maxinuse=130546063
/statistics/memory/contexts/context/inuse=60081
/statistics/memory/contexts/context/maxinuse=71474
/statistics/memory/contexts/context/inuse=281786740
/statistics/memory/contexts/context/maxinuse=282282054
/statistics/memory/contexts/context/inuse=1273964
/statistics/memory/contexts/context/maxinuse=2297129
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13416
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=12840
/statistics/memory/contexts/context/inuse=7824
/statistics/memory/contexts/context/maxinuse=7824
/statistics/memory/contexts/context/inuse=10776
/statistics/memory/contexts/context/maxinuse=10760
/statistics/memory/contexts/context/inuse=11136
/statistics/memory/contexts/context/maxinuse=12200
/statistics/memory/contexts/context/inuse=7824
/statistics/memory/contexts/context/maxinuse=7824
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=344488
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=222352
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=443896
/statistics/memory/contexts/context/inuse=5893777
/statistics/memory/contexts/context/maxinuse=6024999
/statistics/memory/contexts/context/inuse=135744
/statistics/memory/contexts/context/maxinuse=143936
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=42632
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=55464
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=49200
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=73304
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=50696
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=45960
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=41688
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=39024
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=49680
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=52136
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=42832
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=41864
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=36352
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=42840
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=45376
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=46168
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=36624
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=43616
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=60088
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=68344
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=54344
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=42896
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=56016
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=85824
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=42264
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=44320
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=55056
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=49160
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=40328
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=47432
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=43080
/statistics/memory/contexts/context/inuse=4383504
/statistics/memory/contexts/context/maxinuse=4514656
/statistics/memory/contexts/context/inuse=23136
/statistics/memory/contexts/context/maxinuse=23136
/statistics/memory/contexts/context/inuse=576
/statistics/memory/contexts/context/maxinuse=576
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=0
/statistics/memory/contexts/context/maxinuse=0
/statistics/memory/contexts/context/inuse=99120
/statistics/memory/contexts/context/maxinuse=99120
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=178592
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=364952
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76921
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=346072
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=166512
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=346072
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=188608
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=259680
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=181272
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=200784
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=178592
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=166512
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=168064
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=146248
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76929
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76937
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=249312
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=364952
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=446080
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=347720
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=446176
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76929
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=169136
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=364952
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=168064
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=189560
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76921
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=166704
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=14016
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=272544
/statistics/memory/contexts/context/inuse=11136
/statistics/memory/contexts/context/maxinuse=12272
/statistics/memory/contexts/context/inuse=11136
/statistics/memory/contexts/context/maxinuse=10488
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76929
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=77129
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=222352
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=403800
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=165128
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=347720
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76921
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76929
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=14112
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=182056
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=14184
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=249312
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=146248
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=194120
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=272544
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=403800
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=164552
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=215952
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76929
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13664
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76921
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=15040
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=446080
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13320
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=196056
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=298744
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76921
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=215952
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13488
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=189560
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=15304
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=16368
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=225272
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13632
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13664
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76921
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13344
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13616
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13824
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13416
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=222040
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=14096
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13560
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=16368
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=12936
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=13832
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=222040
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=164552
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=16368
/statistics/memory/contexts/context/inuse=11344
/statistics/memory/contexts/context/maxinuse=76929
/statistics/memory/summary/TotalUse=630142559
/statistics/memory/summary/InUse=425120630




-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Phil Mayers
Sent: Monday, January 04, 2016 3:03 PM
To: [hidden email]
Subject: Re: v 9.10.3 max-cache-size not recognised

On 04/01/16 13:54, MAYER Hans wrote:

> As you can see "named" is using 842 MB physical and 982 MB virtual
> memory. Much more than configured.

Well, bind will use memory for things other than cache.

Try accessing the statistics XML channel over HTTP with a browser; it'll render to HTML via stylesheet, and show you memory context usage. Have a look and see what stands out.

FWIW, max-cache-size works fine for us on 9.10.2-P4, and limits it to the appropriate value. We see this reflected in RSS as well.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users