Maintained by: NLnet Labs

[Unbound-users] High number of system context switches

Robert Edmonds
Thu Apr 10 19:56:17 CEST 2014

Jan-Frode Myklebust wrote:
> Any ideas for what we should try to improve this?


You might want to try the excellent "perf" tool to record function-level
performance data for the unbound process.  On my CentOS 6.5 box it's
located in the "perf" package.  See:

Then you can periodically do something like:

    perf record --output="$(date +%Y%m%d.%H%M)" --uid=unbound sleep 5

To collect a five second sample of performance data for all processes
running under the "unbound" user.

Then you can use tools like "perf report" and "perf diff" to analyze the
saved samples.  Maybe a "perf diff" between samples during low traffic
periods versus high traffic periods will show hot spots.

Also, I notice unbound-1.4.21-1.el6.x86_64 appears to use an old version
of libevent:

linked libs: libevent 1.4.13-stable (it uses epoll), ldns 1.6.16, OpenSSL 1.0.0-fips 29 Mar 2010

IIRC, there are substantial performance improvements in libevent 2.x.

Robert Edmonds
edmonds at