[Unbound-users] Slowly memory leak?

W.C.A. Wijngaards wouter at nlnetlabs.nl
Fri May 18 12:12:05 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tomoki,

On 05/17/2012 04:25 PM, fwkh7691 at nifty.com wrote:
> Hi all.
> 
> I'm using unbound 1.4.16 with following server. 
> ==================== FreeBSD9.0(32bit) RAM 4GB 1 CPU 
> ====================
> 
> unbound.conf: ==================== msg-cache-size: 250m 
> rrset-cache-size: 500m module-config: "iterator" 
> ====================
> 
> I checked cache memories using "unbound-control stats_noreset". 
> Increment of msg cache memory is stop at 266MB. Increment of RRset
> cache memory is stop at 532MB.

But the memory allocator has fragmentation overhead, this can increase
to double to allocation in total, 500m and 1000m memory.  That is the
maximum really.

> But, increment of memory usage is not stop. I checked it using ps
> command. The result is following. ============================== #
> date ; ps aux | head -3 Thu May 17 22:52:40 JST 2012 USER      PID
> %CPU %MEM    VSZ    RSS  TT  STAT STARTED        TIME COMMAND root
> 11  99.0  0.0      0      8  ??  RL   13Apr12 48831:35.16 [idle] 
> unbound 14313   5.0 68.6 1445512 1426924  ??  Ss   17Apr12
> 175:47.60 /usr/lo cal/sbin/unbound
> 
> # date ; ps aux | head -3 Thu May 17 23:11:18 JST 2012 USER
> PID  %CPU %MEM    VSZ    RSS  TT  STAT STARTED        TIME COMMAND 
> root       11  94.0  0.0      0      8  ??  RL   13Apr12
> 48848:17.65 [idle] unbound 14313   5.0 68.6 1445512 1426944  ??  Ss
> 17Apr12   177:11.51 /usr/lo cal/sbin/unbound
> 
> Thu May 17 23:22:47 JST 2012 USER      PID  %CPU %MEM    VSZ    RSS
> TT  STAT STARTED        TIME COMMAND root       11  90.0  0.0
> 0      8  ??  RL   13Apr12 48858:33.42 [idle] unbound 14313   6.9
> 68.6 1445512 1427020  ??  Ss   17Apr12   178:04.08 /usr/lo 
> cal/sbin/unbound ============================== - Continuously
> incremented. But, not always. Sometimes this increment is stop. -
> This increment is not synchronized with the number of queries.

I think this is memory fragmentation (the space between allocated
memory blocks, wasted space), that increases slowly.

FreeBSD malloc has debug modes that can give you extra information,
and if that is not sufficient, unbound has an internal alloc-check
mode that tests memory as well (unbound's extra memory checks are
slow) configure with --enable-alloc-lite or with
- --enable-alloc-checks.  You can also enable --enable-alloc-nonregional
to see malloc statistics for things that are normally handled by a
special purpose memory allocator.

Best regards,
   Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPtjyQAAoJEJ9vHC1+BF+NprcP+gIU+XnOVJ6zulbN3fNB5XDA
degTS+LfMzAerW0WlT30xbFmdkDGzQDdUmypZA40lq76G2sB61oNDHdSD1ZgqfDj
c9TtWjO+PXiVJf2ztWjLMJuGXgsb8vvTcC3217r+QKYvnb3TUM4K4pNPxTM2SBER
/x+efG4Zc4aykuS9ic+Xum4NprywhVtVdCQd5z608eLG5PxSg3v+iofPWb84gkf+
j7FtsZKwOMZ9deXInCAaQjFC00I2Bl7bAMzgO0tKu2lx3s+YX7WIU1Lt+VWvvSRr
egBNimFPuq+4Kv+jHzEyoF7bv3pL5r9CgyYDnDLgM9UMPgfZywg5gXSNNF9C7f9S
SZVxtZzgwRhc3LAe1plPC1jVQWQcjMYbA7JAsKFNIHpUEW6vIOnKbC4uFcRh59uh
bZ5ziFBG8zGxgUSRQyKQjaMk/vB89iEicABNuXtOF13tdR08B/O/+XmiNfGedgLv
t8snFX9huAUzqc5ELLNKqyCwYCZRrOWb+WbVlxzlTsut3215pKQUtE44d6uN/8Id
9rZiZiXi5R+Isc6waG5+aA7/EmKY5srDXWGRlQ/E6cPbMBgbmLTmDWhLt9Cy0sPx
qKqvUn5b/yp5H1CWlHqde9gmyT0zb4bovZtyujhLBG2jYHDK+50aaaGYz3ONYM+F
NGPWLnvXI6krPG7Je6lo
=AZpC
-----END PGP SIGNATURE-----



More information about the Unbound-users mailing list