[Unbound-users] BINDs views in unbound

W.C.A. Wijngaards wouter at NLnetLabs.nl
Tue Mar 31 07:00:08 UTC 2009


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

Hi Artis,

Artis Caune wrote:
> 2009/3/30 W.C.A. Wijngaards <wouter at nlnetlabs.nl>:
>> It turns out that in the configure tests the -lssl was changing the
>> outcome of the later -pthread test.  And without that flag it would end
>> up using thread-unsafe library calls.  I've fixed in svn trunk r1569 so
>> that the pthread test is done before the other libraries(SSL, python).
> 
> Thanks, I'll try r1569 patch and submit FreeBSD PR.
> We are now ready for 1.april ;-)

Happy to help.

> I have another question about memory usage.
> I read in "Howto Optimise" that actual memory usage can grow 2.5x
> times of all configured memory.

Basically, the malloc in modern OSes can have about 2x the amount the
program uses due to malloc-overhead, I added another .5x as leeway
(since I don't exactly know how the malloc is implemented, the 2x is
based on the algorithms it uses).

> If I have:
>     num-threads: 4
>     msg-cache-size: 512m
>     rrset-cache-size: 1g
>     neg-cache-size: 256m
> it can grow to 4+ gigs?

Well about 3.5G is twice as much. Add a bit of overhead.

> If I use 4 threads, memory is shared ?
> With processes it's x4 ?

With threads, the memory is shared, indeed.
With processes, every thread has its own cache basically, nonshared
memory, so its 4x3.5g = 14g.

Oh by the way you forgot the key-cache; its 4M by default.  Only really
needed if you do a lot of validation.   And there are many signed zones
out to validate.  Also the infrastructure cache takes up memory.  So
perhaps 4G is a good estimate.

(obligatory remark that unbound has more than just the cache.  The cache
is the dominant factor for memory usage.  The rest is a couple Mb.)

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

iEUEARECAAYFAknRv3gACgkQkDLqNwOhpPjcJACY4de8gy93n3uXE1RzWhsgLnh9
KQCfemyKqK/HvoIXtrOD4oAVX+s3Vmg=
=kV59
-----END PGP SIGNATURE-----



More information about the Unbound-users mailing list