Maintained by: NLnet Labs

Unbound swapping

W.C.A. Wijngaards
Thu Sep 14 10:08:12 CEST 2017


Hi Eduardo,

I have no real good idea.  But looking at your numbers, I see that you
are running a network heavy application, unbound, and it uses about 10G
on 12G memory.  The buff/cache is 2G.  Adds up to 12G.  And it is
swapping.  Sounds reasonable, it is maxed out on memory, this is where
swap is supposed to make space, right?

These options change the buffer space allocated by unbound: so-rcvbuf,
so-sndbuf, maybe also so-reuseport, or more tcp connections (that use
buffer space) or more network interfaces, or simply a different kernel
version that uses (slightly) more memory or something along those lines.

What is the limit on the subnet cache size?  What does the memory max
out on when the subnetmodule is not enabled?

Best regards, Wouter

On 12/09/17 01:28, Eduardo Schoedler via Unbound-users wrote:
> I'm trying to understand why unbound is swapping ~900MB:
> 
> root at dns:~# top -b -n 1 | grep "SWAP\|unbound"
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
> SWAP COMMAND
> 11991 unbound   20   0 9751036 8.189g   3824 S  81.2 69.9   3192:03
> 840364 unbound
> 
> 
> root at dns:~# cat /etc/unbound/unbound.conf | grep '\-size'
>         ratelimit-size: 16m
>     rrset-cache-size: 1536m
>     msg-cache-size: 768m
> 
> This configuration doesn't hurt the "2.5x" tip from documentation.
> 
> root at dns:~# free -m
>               total        used        free      shared  buff/cache   available
> Mem:          12004        8814        1296         237        1893        1449
> Swap:          3395         907        2488
> 
> root at dns:~# unbound-control stats_noreset | grep mem
> mem.cache.rrset=110262793
> mem.cache.message=92861937
> mem.mod.iterator=16548
> mem.mod.validator=5767649
> mem.mod.respip=0
> mem.mod.subnet=872423102
> 
> root at dns:~# unbound-control stats_noreset | grep time
> time.now=1505172298.707575
> time.up=265711.841724
> time.elapsed=279.009376
> 
> root at dns:~# sysctl vm.swappiness
> vm.swappiness = 10
> 
> Some clue?
> 
> Thank you.
> 
> 
> Regards,
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://unbound.nlnetlabs.nl/pipermail/unbound-users/attachments/20170914/e50aad95/attachment.sig>