Bug 1464850

Summary: [RFE] backport whole --with-tuning=large option from bind 9.10.x and use it during compilation
Product: Red Hat Enterprise Linux 7 Reporter: Yogita <ysoni>
Component: bindAssignee: Petr Menšík <pemensik>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: low Docs Contact:
Priority: medium    
Version: 7.3CC: pemensik, psklenar, salmy, thozza
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bind-9.9.4-57.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 11:56:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1420851, 1465887, 1465928    

Description Yogita 2017-06-26 05:16:25 UTC
Description of problem:
RFE to have RHEL7 version of BIND (package bind-9.9.4-38.el7_3.3.x86_64.rpm) compiled with the --with-tuning=large compile flag or has equivalent optimizations for large deployments, as described in: https://kb.isc.org/article/AA-01314/0/-with-tuninglarge-about-using-this-build-time-option.html

Version-Release number of selected component (if applicable):
bind-9.9.4-38.el7_3.3.x86_64.rpm

Additional info:
There is no "--with-tuning=large" option in RHEL6 (bind-9.8.2) nor RHEL7 (bind-9.9.4) that could be turned on during compile time as it is in upstream bind-9.10.x:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ bind-9.8.2rc1]$ grep -R with-tuning
[ bind-9.8.2rc1]$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is also no way to tune the hard coded values described in the provided isc kbase article other than changing them by hand on source code level (there is no UDPBUFFERS, EXCLBUFFERS, RESOLVER_NTASKS in RHEL6/7 code):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ egrep -R "ISC_SOCKET_MAXEVENTS|ISC_SOCKET_MAXSOCKETS|RCVBUFSIZE|RESOLVER_NTASKS|UDPBUFFERS|EXCLBUFFERS" | grep define | grep ".c:" | grep -v FD_SETSIZE
bind-9.8.2rc1/lib/isc/win32/socket.c:#define RCVBUFSIZE (32*1024)
bind-9.8.2rc1/lib/isc/unix/socket.c:#define ISC_SOCKET_MAXSOCKETS 4096
bind-9.8.2rc1/lib/isc/unix/socket.c:#define ISC_SOCKET_MAXEVENTS        64
bind-9.8.2rc1/lib/isc/unix/socket.c:#define RCVBUFSIZE (32*1024)
$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In comparison with the upstream source code (bind-9.10.5-P1) we can see '--with-tuning' option is existing there:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ bind-9.10.5-P1]$ grep -R with-tuning
bin/named/named.docbook:            "configure --with-tuning=large".
bin/named/named.html:            "configure --with-tuning=large".
win32utils/Configure:"  with-tuning=OPTION    tune for plaform size (large|default)\n",
win32utils/Configure:#  --with-tuning supported
README:  - A new "configure --with-tuning=large" option tunes certain
README: by specifying "--with-tuning=large" on the configure command
CHANGES:3980.   [bug]           Improve --with-tuning=large by self tuning of SO_RCVBUF
CHANGES:                        --with-tuning=large. [RT #37059]
CHANGES:3745.   [func]          "configure --with-tuning=large" adjusts various
doc/arm/man.named.html:            "configure --with-tuning=large".
configure:  --with-tuning=ARG       Specify server tuning (large or default)
configure:# was --with-tuning specified?
configure:# Check whether --with-tuning was given.
configure:              as_fn_error $? "You must specify \"large\" or \"default\" for --with-tuning." "$LINENO" 5
configure:test "large" = "$use_tuning" && echo "    Large-system tuning (--with-tuning)"
configure:test "large" = "$use_tuning" || echo "    Large-system tuning (--with-tuning)"
configure.in:# was --with-tuning specified?
configure.in:   [  --with-tuning=ARG       Specify server tuning (large or default)],
configure.in:           AC_MSG_ERROR([You must specify "large" or "default" for --with-tuning.])
configure.in:test "large" = "$use_tuning" && echo "    Large-system tuning (--with-tuning)"
configure.in:test "large" = "$use_tuning" || echo "    Large-system tuning (--with-tuning)"
[ bind-9.10.5-P1]$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and also various compile time values available:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ bind-9.10.5-P1]$ egrep -R "ISC_SOCKET_MAXEVENTS|ISC_SOCKET_MAXSOCKETS|RCVBUFSIZE|RESOLVER_NTASKS|UDPBUFFERS|EXCLBUFFERS" | grep define
bin/named/server.c:#define RESOLVER_NTASKS 523
bin/named/server.c:#define UDPBUFFERS 32768
bin/named/server.c:#define EXCLBUFFERS 32768
bin/named/server.c:#define RESOLVER_NTASKS 31
bin/named/server.c:#define UDPBUFFERS 1000
bin/named/server.c:#define EXCLBUFFERS 4096
bin/named/interfacemgr.c:#define UDPBUFFERS 32768
bin/named/interfacemgr.c:#define UDPBUFFERS 1000
lib/dns/client.c:#define RESOLVER_NTASKS 523
lib/dns/client.c:#define RESOLVER_NTASKS 31
lib/isc/win32/socket.c:#define RCVBUFSIZE (32*1024)
lib/isc/unix/socket.c:#define ISC_SOCKET_MAXSOCKETS 21000
lib/isc/unix/socket.c:#define ISC_SOCKET_MAXSOCKETS 4096
lib/isc/unix/socket.c:#define ISC_SOCKET_MAXSOCKETS FD_SETSIZE
lib/isc/unix/socket.c:#define ISC_SOCKET_MAXEVENTS      2048
lib/isc/unix/socket.c:#define ISC_SOCKET_MAXEVENTS      64
lib/isc/unix/socket.c:#define RCVBUFSIZE (1*1024*1024)
lib/isc/unix/socket.c:#define RCVBUFSIZE (16*1024*1024)
lib/isc/unix/socket.c:#define RCVBUFSIZE (32*1024)
[ bind-9.10.5-P1]$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comment 11 errata-xmlrpc 2018-04-10 11:56:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0742