Bug 1692940

Summary: High memory consumption for named after rndc reload
Product: Red Hat Enterprise Linux 7 Reporter: SHAURYA <sshaurya>
Component: bindAssignee: Petr Menšík <pemensik>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: pierre-yves.goubet
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-14 11:49:16 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: 1709724, 1780662    
Attachments:
Description Flags
named_stats.txt none

Description SHAURYA 2019-03-26 17:27:35 UTC
Description of problem:

When we start process named-chroot memory consumption is normal. When we are using command rndc reload in order to reload configuration, the memory is increased twice and consume high memory (90%) and impacts server reactivity.

Version-Release number of selected component (if applicable):

This behaviour is experiencing on RHEL 7.6 since bind version 9.9.4.61.

How reproducible:

each time we execute rndc reload.

It seems appear since this version package (9.9.4.61) was build with option --with-tuning=large. ISC documentation says "Note also, that running a binary that has been built with --with-tuning=large may not help the performance of a smaller and low-end BIND server because it will cause named to consume more resources than it needs, which in itself could cause issues rather than improving throughput."  We are in this case, it impacts server performance as memory is not free.

Could you provide us built packages without option --with-tuning=large?

Comment 2 Petr Menšík 2019-04-02 10:58:51 UTC
I confirm there is some raise in used memory after rndc reload, both in named-chroot and named service. But it increases only the first time server is reloaded, after that is keeps at the same levels.

But there are absolutly no numbers I can work with in this report.
Prepared just few data entries by this command:
yum install ldns
ldns-gen-zone -a 10000 -o test named.empty > /var/named/test.zone

cat NAMEDCONF >> /etc/named.conf
zone "test" IN {
        type master;
        file "test.zone";
};
NAMEDCONF

I used this command to test it:
$ systemctl start named-chroot && ps u -C named && rndc reload && ps u -C named
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
named    23948  0.2  4.5 233428 85144 ?        Ssl  06:38   0:00 /usr/sbin/named
server reload successful
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
named    23948  0.3  7.9 299744 150388 ?       Ssl  06:38   0:00 /usr/sbin/named

I can see significant increase in used RSS memory. But it is far from 90% as reported.

No configuration or number of zones or data were provided. No output of rndc stats is available, which should be relevant. Can it be run before reload and after it? Then contents of last parts in /var/named/data/named_stats.txt should contain some changed data.

I can search why it increases memory usage. Is customer limiting cache size by max-cache-size option to any value? How many zones and records does customer have in their configuration?

Comment 4 SHAURYA 2019-04-08 09:38:33 UTC
Created attachment 1553524 [details]
named_stats.txt

Comment 6 Petr Menšík 2020-01-14 11:49:16 UTC
This reported issue is the same as older bug #1578051. Even outcome seems the same, it became issue with --tuning=large. Would be solved as single bug eventually.

*** This bug has been marked as a duplicate of bug 1578051 ***