bind memory usage

bind memory usage

Post by Leonardo R » Sun, 14 Dec 2008 22:50:52



Hi,

i'm trying to run bind 9.5.0-P2 on a very low memory system. It's a =

RouterBoard 450 with 32Mb RAM running OpenWRT.

root@sede:~# cat /proc/meminfo
MemTotal: 29920 kB

the problem is that bind seems to consume a LOT of memory ... well, =

a lot for low memory devices, i never noticed that on machines with GBs =

of RAM.

Right after starting, bind uses 15% of my system memory, which would =

be about almost 4,5Mb. And memory usage grows when requests are being =

answered. I have seen bind using 25% of my memory, which would be about =

7.5Mb. Of course there's all the cache stuff, which i tried to limit with:

max-cache-size 1048576;

but it didnt helped much .... even with very few thing stored on =

cache, which i can check with 'rndc stats', bind memory keeps growing to =

unnaceptable levels given my very low memory resources. rndc flush, =

which should empty the cache, simply didnt low memory usage, thus =

showing that it's not the cache that's eating that much memory.

just for comparison, maradns, another caching nameserver (not simply =

dns forwarder, it's a recursive server) that i'm used to run on OpenWRT, =

has a memory usage of about 1Mb and it didnt vary too much from that. Of =

course maradns dont have LOOOTS of features bind has .... but i'm really =

interested on running bind because i'll have to configure some DNSSec =

verifications and none of these 'small' DNS servers do that.

question is .... is there something i can do to low bind's memory =

usage and successfully run it on those very low embedded devices ???

-- =



Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.yqcomputer.com/

Minha armadilha de SPAM, N=C3O mandem email
XXXX@XXXXX.COM
My SPAMTRAP, do not email it





_______________________________________________
bind-users mailing list
XXXX@XXXXX.COM
https://lists.isc.org/mailman/listinfo/bind-users
 
 
 

bind memory usage

Post by JINMEI Tat » Mon, 15 Dec 2008 08:15:42

At Sat, 13 Dec 2008 11:50:52 -0200,

=







[snip]



Admittedly, BIND9 tends to require a lot of memory. I'm not sure if
it can reasonably function with a total system memory of 32MB.

Some related points:
- if you enable threads, disable them. With the thread support BIND9
will require even more memory.
- "max-cache-size 1048576" is a meaningless configuration:
Any positive values less than 2MB will be ignored reset
to 2MB.
(from ARM)
- 'rndc flush' doesn't release allocated system memory. It just
frees all cache entries within the BIND9 process, so it's not
surprising that you didn't see the memory footprint decrease after
the flush operation.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.
_______________________________________________
bind-users mailing list
XXXX@XXXXX.COM
https://lists.isc.org/mailman/listinfo/bind-users

 
 
 

bind memory usage

Post by Leonardo R » Mon, 15 Dec 2008 21:29:46

his is a multi-part message in MIME format.
--===============6900057898676977720==
Content-Type: multipart/alternative;
boundary="------------090300080608010504090704"

This is a multi-part message in MIME format.
--------------090300080608010504090704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable



JINMEI Tatuya / ???? escreveu:

yes threads are already disabled. Compilation is done this way:

CONFIGURE_ARGS +=3D \
--enable-shared \
--enable-static \
--enable-ipv6 \
--with-randomdev=3D"/dev/urandom" \
--disable-threads \
--with-openssl=3D"$(STAGING_DIR)/usr" \
--with-libtool \
--with-libxml2=3Dno \
, \
BUILD_CC=3D"$(TARGET_CC)" \


i do RTFM :) .... and on the options section, max-cache-size=20
description, there's nothing about that. But if you say so, i'm sure=20
it's there somewhere :) I have done a quick search on 9.5 ARM and really =

didnt find it .....

anyway, i successfully found that validation on the code ...=20
dns_cache_setcachesize and DNS_CACHE_MINSIZE ..... anything smaller than =

2Mb is replaced by 2Mb. Anyway, even the 1Mb being meaningless, it would =

force the DNS_CACHE_MINSIZE (2Mb) to be used and not the default one=20
which is 32Mb. Even if the 1Mb parameter is ignored, the 2Mb would be=20
something to me, comparing to 32Mb default one.

anyway, thanks for the tip. I would never realize that.

--=20


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, N=C3O mandem email
XXXX@XXXXX.COM
My SPAMTRAP, do not email it




--------------090300080608010504090704
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
JINMEI Tatuya / 神明達哉 escreveu:
<blockquote cite="mid:m2wse3650h.wl% XXXX@XXXXX.COM " type="cite"><br>
<blockquote type="cite">
<pre wrap=""> question is .... is there something i can do to low bind's memory
usage and successfully run it on those very low embedded devices ???
</pre>
</blockquote>
<pre wrap=""><!---->
Admittedly, BIND9 tends to require a lot of memory. I'm not sure if
it can reasonably function with a total system memory of 32MB.

Some related points:
- if you enable threads, disable them. With the thread support BIND9
will require even more memory.
</pre>
</blockquote>
    yes threads are already disabled. Compilation is done this way:<br>
<br>
CONFIGURE_ARGS += \<br>
                --enable-shared \<br>
                --enable-static \<br>
                --enable-ipv6 \<br>
    &nb
 
 
 

bind memory usage

Post by TGVvbmFyZG » Mon, 15 Dec 2008 21:36:02

CgpQZXRlciBEYW1iaWVyIGVzY3JldmV1Ogo+IEkgY2FuIGNvbmZpcm0gYmluZCA5LjQgZG9lcyBy
dW4gb24gYW4gKElCTSwgbm90IEludGVsKSA0ODYtU0NMLzIgd2l0aCAxNiBNQi4KPiBUaGF0IGNw
dSBjYW4gYWRkcmVzcyBubyBtb3JlIHRoYW4gMTYgTUIuCj4KPiAkIGNhdCAvcHJvYy9tZW1pbmZv
Cj4gICAgICAgICB0b3RhbDogICAgdXNlZDogICAgZnJlZTogIHNoYXJlZDogYnVmZmVyczogIGNh
Y2hlZDoKPiBNZW06ICAxNDU0MDgwMCAxMDU5NjM1MiAgMzk0NDQ0OCAgMzE5NDg4MCAgMTAwMzUy
MCAgMzUxODQ2NAo+ICAgCgogICAgdmVyeSBnb29kIHRvIGtub3cgdGhhdCA5LjQgaXMgcnVubmlu
ZyBPSyBvbiBhIDE2TWIgbWFjaGluZSwgYSAKc2l0dWF0aW9uIGV2ZW4gd29yc3QgdGhhbiBtaW5l
LCB3aGljaCBpcyAzMk1iIDopICAuLi4uIGknbGwgdHJ5IHRvIAppbnN0YWxsIDkuNCB0aGlzIHdl
ZWsgaW5zdGVhZCBvZiA5LjUgYW5kIGNoZWNrIGlmIGl0IGhhcyBhIHNsb3dlciBtZW1vcnkgCmZv
b3RwcmludC4KCiAgICB0aGFua3MgZm9yIHRoZSB0aXAgISEhCgotLSAKCgoJQXRlbmNpb3NhbWVu
dGUgLyBTaW5jZXJpbHksCglMZW9uYXJkbyBSb2RyaWd1ZXMKCVNvbHV0dGkgVGVjbm9sb2dpYQoJ
aHR0cDovL3d3dy5zb2x1dHRpLmNvbS5icgoKCU1pbmhhIGFybWFkaWxoYSBkZSBTUEFNLCBOw4NP
IG1hbmRlbSBlbWFpbAoJZ2VydHJ1ZGVzQHNvbHV0dGkuY29tLmJyCglNeSBTUEFNVFJBUCwgZG8g
bm90IGVtYWlsIGl0CgoKCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fXwpiaW5kLXVzZXJzIG1haWxpbmcgbGlzdApiaW5kLXVzZXJzQGxpc3RzLmlzYy5vcmcK
aHR0cHM6Ly9saXN0cy5pc2Mub3JnL21haWxtYW4vbGlzdGluZm8vYmluZC11c2Vycw==
 
 
 

bind memory usage

Post by schul » Wed, 17 Dec 2008 00:18:34

In article <gi2uke$2d89$ XXXX@XXXXX.COM >,
=?UTF-8?B?TGVvbmFyZG8gUm9kcmlndWVzIE1hZ2FsaMOjZXM=?=



You know, the above is not very usefull. Can someone please fix the
newsgroup gateway.
--
Tom Schulz
XXXX@XXXXX.COM
_______________________________________________
bind-users mailing list
XXXX@XXXXX.COM
https://lists.isc.org/mailman/listinfo/bind-users
 
 
 

bind memory usage

Post by Sam Wilso » Wed, 17 Dec 2008 02:38:29

In article <gi5sh1$f17$ XXXX@XXXXX.COM >, XXXX@XXXXX.COM (Thomas Schulz)




The content is below. I forward it only because it's actually concrete
result that might be useful to someone.

Sam
========================================================================


I just test bind 9.5.0-P2 and 9.5.1-rc1

Bind 9.5.0-P2 allocate over 2Gb per 10 minutes of work.
Bind 9.5.1 allocate 2Gb per 30 hours.

14.12.2008, <D0><B2> 2:15, JINMEI Tatuya /
<E7><A5><9E><E6><98><8E><E9><81><94>
<E5><93><89>
<D0><BD><D0><B0><D0><BF><D0><B8><D1><81><D0><B0><D0><BB>(<D0><B0>):



_______________________________________________
bind-users mailing list
XXXX@XXXXX.COM
https://lists.isc.org/mailman/listinfo/bind-users
_______________________________________________
bind-users mailing list
XXXX@XXXXX.COM
https://lists.isc.org/mailman/listinfo/bind-users
 
 
 

bind memory usage

Post by JINMEI Tat » Sat, 20 Dec 2008 04:55:28

At Wed, 17 Dec 2008 23:36:31 -0200,


6 MB.

ts.

I suspect you should compare 9.4.3 with 9.5.1 (currently rc). There
are many differences between pre-and-post P1/P2 versions. So you may
be comparing an apple with an orange (even though you may already be
comparing different fruits by comparing 9.4 with 9.5, though).

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.
_______________________________________________
bind-users mailing list
XXXX@XXXXX.COM
https://lists.isc.org/mailman/listinfo/bind-users