How to determine if you are using a threaded build
  • 20 Sep 2018
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark
    Light

How to determine if you are using a threaded build

  • Print
  • Share
  • Dark
    Light

To take advantage of multi-core computers BIND 9 must be built as a multi-threaded binary. This may not be the default for all BIND versions or on all platforms.

To find out if you are using a threaded build, run the following command.  The text you should see, if you are using a multi-threaded build, is highlighted.  Different versions of BIND may display different amounts of other information as well.  In addition, ensure that no file /tmp/notthere exists before running this command.  If it does, use some other file name.  Using a file that does not exist causes named to display its startup information, then exit.

# named -g -c /tmp/nothtere
24-Feb-2012 12:33:53.907 starting BIND 9.9.0rc2 -g -c /tmp/notthere
24-Feb-2012 12:33:53.907 built with '--enable-threads' '--with-atf' 'CC=clang'
24-Feb-2012 12:33:53.907 ----------------------------------------------------
24-Feb-2012 12:33:53.907 BIND 9 is maintained by Internet Systems Consortium,
24-Feb-2012 12:33:53.907 Inc. (ISC), a non-profit 501(c)(3) public-benefit
24-Feb-2012 12:33:53.907 corporation.  Support and training for BIND 9 are
24-Feb-2012 12:33:53.907 available at https://www.isc.org/support
24-Feb-2012 12:33:53.907 ----------------------------------------------------
24-Feb-2012 12:33:53.907 found 8 CPUs, using 8 worker threads
24-Feb-2012 12:33:53.907 using 8 UDP listeners per interface
24-Feb-2012 12:33:53.908 using up to 4096 sockets
24-Feb-2012 12:33:53.937 loading configuration from '/tmp/notthere'
24-Feb-2012 12:33:53.938 open: /tmp/notthere: file not found
24-Feb-2012 12:33:53.938 loading configuration: file not found
24-Feb-2012 12:33:53.938 exiting (due to fatal error)

If you do not see this string, you are not using a threaded build and your named process as well as dnssec-signzone will not take advantage of multiple CPU cores.