Unbound - DNS récursif (utilisé par OPNsense)
Find a file
Renaud Métrich d63cb99649 Changed log lock from 'quick' to 'basic' because this is an I/O lock.
We cannot use a 'quick' lock (i.e. lock spinning on the CPU) for the log
lock because it can wait a lot on I/Os. Using a 'quick' lock leads to
eating the CPU for no good reason.

Example of 'pidstat' output when using various locks for log_lock:

- 'quick' lock and slow log file system (tail -f on the log file on XFS on RHEL 8)

04:15:11 PM   UID      TGID       TID    %usr %system    %CPU CPU  Command
04:15:21 PM   998     16431         -  100.00    4.20  100.00   2  unbound
04:15:21 PM   998         -     16431   31.00    1.00   32.00   2  |__unbound
04:15:21 PM   998         -     16432   31.30    0.80   32.10   0  |__unbound
04:15:21 PM   998         -     16433   30.20    1.40   31.60   1  |__unbound
04:15:21 PM   998         -     16434   30.70    1.00   31.70   3  |__unbound

- 'quick' lock and log file system being fast

04:15:40 PM   UID      TGID       TID    %usr %system   %CPU CPU  Command
04:15:50 PM   998     16431         -   10.00    1.60  11.60   1  unbound
04:15:50 PM   998         -     16431    2.50    0.50   3.00   1  |__unbound
04:15:50 PM   998         -     16432    2.30    0.40   2.70   3  |__unbound
04:15:50 PM   998         -     16433    2.70    0.30   3.00   0  |__unbound
04:15:50 PM   998         -     16434    2.60    0.40   3.00   2  |__unbound

- 'basic' lock (this commit) and slow log file system (tail -f on the log file on XFS on RHEL 8)

04:29:48 PM   UID      TGID       TID    %usr %system   %CPU CPU  Command
04:29:58 PM   998     11632         -    7.10   14.10  21.20   3  unbound
04:29:58 PM   998         -     11632    1.70    3.20   4.90   3  |__unbound
04:29:58 PM   998         -     11633    1.60    3.30   4.90   1  |__unbound
04:29:58 PM   998         -     11634    2.00    4.10   6.10   1  |__unbound
04:29:58 PM   998         -     11635    1.90    3.50   5.40   1  |__unbound

We can see in the above example, when 'basic' lock is used, that CPU
isn't consumed when log file system is slow.

Another reproducer scenario: put the log file on a NFS share with 'sync'
option.
2019-11-26 16:32:07 +01:00
cachedb - Fix Local Memory Leak in cachedb_init(), 2019-11-20 12:56:39 +01:00
compat Fix compiler warnings. 2019-11-22 14:30:56 +01:00
contrib - Fix Config Injection in create_unbound_ad_servers.sh, 2019-11-20 12:02:19 +01:00
daemon - Fix Bad Randomness in Seed, reported by X41 D-Sec. 2019-11-20 14:40:50 +01:00
dns64 - Fix comments for doxygen in dns64. 2019-11-20 15:22:20 +01:00
dnscrypt - Fix Terminating Quotes not Written, reported by X41 D-Sec. 2019-11-20 14:01:01 +01:00
dnstap portability. 2018-10-22 10:19:30 +00:00
doc - Add make distclean that removes everything configure produced, 2019-11-22 15:10:02 +01:00
edns-subnet - Fix edns-subnet locks, in error cases the lock was not unlocked. 2019-05-07 16:10:22 +02:00
ipsecmod - Fix Unchecked NULL Pointer in dns64_inform_super() 2019-11-19 15:48:18 +01:00
ipset - ipset: refactor long routine into three smaller ones. 2019-09-02 15:17:25 +02:00
iterator - Fix wrong response ttl for prepended short CNAME ttls, this would 2019-09-19 16:29:51 +02:00
libunbound - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
pythonmod - Fix python examples/calc.py for eval, reported by X41 D-Sec. 2019-11-20 15:07:09 +01:00
respip - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
services - Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec. 2019-11-22 14:23:00 +01:00
sldns - Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec. 2019-11-22 14:23:00 +01:00
smallapp - Adjust unbound-control to make stats_shm a read only operation. 2019-11-20 11:18:03 +01:00
testcode - Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec. 2019-11-22 14:23:00 +01:00
testdata - Fix #48: Unbound returns additional records on NODATA response, 2019-07-12 14:34:35 +02:00
util Changed log lock from 'quick' to 'basic' because this is an I/O lock. 2019-11-26 16:32:07 +01:00
validator - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
winrc Cleaner image. 2018-12-03 11:24:51 +00:00
.gitattributes - .gitattributes line for githubs code language display. 2016-11-03 08:29:29 +00:00
.gitignore - gitignore .source tempfile used for compatible make. 2019-11-18 15:58:19 +01:00
.travis.yml fixup shell 2019-05-01 13:39:32 +02:00
ac_pkg_swig.m4 - Fix #1230: swig version 2.0.0 is required for pythonmod, with 2017-03-07 10:40:45 +00:00
aclocal.m4 - Newer aclocal and libtoolize used for generating configure scripts, 2019-01-24 08:57:47 +00:00
acx_nlnetlabs.m4 - Fix #1434: Fix windows openssl 1.1.0 linking. 2017-09-05 08:28:39 +00:00
acx_python.m4 - Fix #1239: configure fails to find python distutils if python 2017-03-23 10:23:38 +00:00
ax_pthread.m4 - updated ax_pthread.m4 to version 21 with clang support, this 2015-12-11 12:19:12 +00:00
config.guess - Newer aclocal and libtoolize used for generating configure scripts, 2019-01-24 08:57:47 +00:00
config.h.in - Fix Integer Overflow in Regional Allocator, 2019-11-19 15:38:05 +01:00
config.sub - Newer aclocal and libtoolize used for generating configure scripts, 2019-01-24 08:57:47 +00:00
configure - Fix compile with --enable-alloc-checks, reported by X41 D-Sec. 2019-11-20 13:51:10 +01:00
configure.ac - Fix compile with --enable-alloc-checks, reported by X41 D-Sec. 2019-11-20 13:51:10 +01:00
install-sh - Newer aclocal and libtoolize used for generating configure scripts, 2019-01-24 08:57:47 +00:00
LICENSE - Fix #551: License change "Regents" to "Copyright holder", matching 2014-02-07 12:43:43 +00:00
ltmain.sh - Newer aclocal and libtoolize used for generating configure scripts, 2019-01-24 08:57:47 +00:00
makedist.sh fixup to remove .git from makedist tarballs. 2019-05-01 12:47:53 +02:00
Makefile.in - Add make distclean that removes everything configure produced, 2019-11-22 15:10:02 +01:00
README gmake no longer needed. 2012-02-10 10:34:15 +00:00
README.md - oss-fuzz badge on README.md. 2019-09-19 09:55:23 +02:00
systemd.m4 - Fix autoconf of systemd check for lack of pkg-config. 2017-02-13 10:15:01 +00:00

Unbound

Travis Build Status Packaging status Fuzzing Status

Unbound is a validating, recursive, caching DNS resolver. It is designed to be fast and lean and incorporates modern features based on open standards. If you have any feedback, we would love to hear from you. Dont hesitate to create an issue on Github or post a message on the Unbound mailing list. You can lean more about Unbound by reading our documentation.

Compiling

Make sure you have the C toolchain, OpenSSL and its include files, and libexpat installed. Unbound can be compiled and installed using:

./configure && make && make install

You can use libevent if you want. libevent is useful when using many (10000) outgoing ports. By default max 256 ports are opened at the same time and the builtin alternative is equally capable and a little faster.

Use the --with-libevent=dir configure option to compile Unbound with libevent support.

Unbound configuration

All of Unbound's configuration options are described in the man pages, which will be installed and are available on the Unbound documentation page.

An example configuration file is located in doc/example.conf.