performance loss in 9.16 compared to version 9.11
Summary
I was doing some test before upgrading from bind 9.11 to 9.16 and I encounter a performance loss between those versions. I was at 400k query per second in bind 9.11 and 100k query per second in bind 9.16.
Hardawre Configuration :
- DNS Server ( FreeBSD-11 ):
DELL R640
Intel Network Adapter X710
Intel(R) Xeon(R) Gold 5215 CPU @ 2.50GHz 10C/20T
RAM 32G DDR4
- Bench ( Debian 10 ) :
DELL R340
Intel Network Adapter X710
Intel(R) Xeon(R) E-2136 CPU @ 3.30GHz 6C/12T
RAM 32G DDR4
Network Configuration
---------- ------------
| |<-----[ LAN ]-------------------------->| |
| DNS | | BENCH |
| |<-----[ Bench Dedicated Fiber ]-------->| |
--------- 60.0/8 ------------
DNS IP for the bench : 60.0.0.1
BENCH IP : 60.0.0.2
DNS Configuration
named.conf :
options {
listen-on-v6 { any; };
version "";
max-cache-size 100M;
max-journal-size 10M;
check-names master ignore;
check-integrity no;
check-sibling no;
dnssec-secure-to-insecure yes;
directory "/etc/namedb";
recursion no;
server-id "bind-auth";
};
controls {
inet 127.0.0.1 port 953 allow {
127.0.0.1/32;
} ;
};
acl "admin" {
"any";
};
zone "incache" {
type master;
file "incache.db";
allow-update { any; };
};
incache.db:
$ORIGIN @
$TTL 86400 ; 1 day
@ IN SOA bench. root. (
6293 ; serial
21600 ; refresh (6 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
600 ; minimum (10 minutes)
)
NS bench
bench A 10.0.22.24
$TTL 86400 ; 1 day
* A 1.1.1.1
* AAAA 8888::1111
BIND version test on FreeBSD-11
BIND 9.16.6 (Stable Release) id:25846cfe
running on FreeBSD amd64 11.4-STABLE FreeBSD 11.4-STABLE #919 r362186M
built by make with '--enable-threads' '--with-make-clean=no' '--with-gssapi=/usr/local' '--with-geoip' '--prefix=/' '--enable-filter-aaaa' '--enable-fetchlimit'
compiled by CLANG FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
compiled with OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
linked to OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
compiled with libxml2 version: 2.9.10
linked to libxml2 version: 20910
compiled with libjson-c version: 0.15
linked to libjson-c version: 0.15
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
threads support is enabled
BIND 9.11.22 (Extended Support Version) id:6a05a966
running on FreeBSD amd64 11.4-STABLE FreeBSD 11.4-STABLE #919 r362186M
built by make with '--enable-threads' '--with-make-clean=no' '--with-gssapi=/usr/local' '--with-geoip' '--prefix=/' '--enable-filter-aaaa' '--enable-fetchlimit'
compiled by CLANG FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
compiled with OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
linked to OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
compiled with libxml2 version: 2.9.10
linked to libxml2 version: 20910
compiled with libjson-c version: 0.15
linked to libjson-c version: 0.15
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
threads support is enabled
Software for the Bench
DNSGEN Command Use
dnsgen -i enp1s0f0 -a 60.0.0.2 -s 60.0.0.1 -m f8:f2:f0:f0:f0:f0 -p 53 -d stressfile.dat -r 1000000 -M -R 1 -l 10
Results
Bind 9.16 :
DNSGEN :
267251.500128893 1000094 115500 100224 11552
267251.600128893 1000095 115500 99840 11552
267251.700128893 1000096 115520 100224 11584
267251.800128893 1000097 115540 99840 11584
267251.900128893 1000098 115540 100160 11569
267252.000128893 1000099 115520 99904 11525
267252.100128893 1000100 109760 384 44
Peak RX rate = 115540
RCODE 0: 1154189
TOP :
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
43160 named 63 52 0 254M 128M sigwai 19 0:12 103.44% named{isc-net-0019}
Bind 9.11 :
DNSGEN :
267411.400128183 1000093 440780 100192 43999
267411.500128183 1000094 441250 99872 44737
267411.600128183 1000095 441430 99840 44303
267411.700128183 1000096 441760 100224 44483
267411.800128183 1000097 442160 99840 44430
267411.900128183 1000098 442380 100160 44404
267412.000128183 1000099 442500 99840 44383
267412.100128183 1000100 420590 384 108
Peak RX rate = 444100
RCODE 0: 4419370
TOP :
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
44366 named 24 52 0 85584K 36852K sigwai 1 5:00 1659.57% named
PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND
44366 named 84 0 85584K 36616K CPU10 10 0:05 89.23% named{isc-worker0012}
44366 named 34 0 85584K 36616K CPU19 19 0:01 88.51% named{isc-worker0006}
44366 named 84 0 85584K 36616K CPU12 12 0:05 87.89% named{isc-worker0007}
44366 named 84 0 85584K 36616K CPU8 8 0:05 87.87% named{isc-worker0015}
44366 named 83 0 85584K 36616K RUN 4 0:05 87.76% named{isc-worker0010}
44366 named 83 0 85584K 36616K CPU17 17 0:05 87.35% named{isc-worker0008}
44366 named 84 0 85584K 36616K RUN 1 0:05 87.15% named{isc-worker0001}
44366 named 84 0 85584K 36616K RUN 5 0:05 87.14% named{isc-worker0003}
44366 named 83 0 85584K 36616K CPU9 9 0:05 86.93% named{isc-worker0000}
44366 named 84 0 85584K 36616K CPU14 14 0:05 86.72% named{isc-worker0016}
44366 named 84 0 85584K 36616K CPU7 7 0:05 86.72% named{isc-worker0017}
44366 named 83 0 85584K 36616K CPU11 11 0:05 86.61% named{isc-worker0005}
44366 named 83 0 85584K 36616K CPU16 16 0:05 86.53% named{isc-worker0019}
44366 named 84 0 85584K 36616K CPU6 6 0:05 86.22% named{isc-worker0009}
44366 named 83 0 85584K 36616K CPU15 15 0:05 86.12% named{isc-worker0013}
44366 named 84 0 85584K 36616K RUN 16 0:05 85.84% named{isc-worker0018}
44366 named 83 0 85584K 36616K RUN 2 0:05 85.82% named{isc-worker0004}
44366 named 83 0 85584K 36616K RUN 3 0:05 85.44% named{isc-worker0011}
44366 named 83 0 85584K 36616K CPU13 13 0:05 84.97% named{isc-worker0014}
Conclusion
On the same hardware and on the same OS ( FreeBSD 11 ), I have found a drop of performance between Bind 9.11 and Bind 9.16 On Bind 9.11 we have 400k query per second with ~20 Threads working on the 24 created. And on Bind 9.16 we have only 100K query per second with 1 Threads working on the 63 created.
I am available to conduct more test if you need to.
Best regards.