Bug 1322001

Summary: Increase inotify_user_watches to allow for more pods on an atomic-host
Product: Red Hat Enterprise Linux 7 Reporter: Jeremy Eder <jeder>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: high Docs Contact: Jiri Herrmann <jherrman>
Priority: unspecified    
Version: 7.3CC: jeder, jherrman, jscotka, jskarvad, sdodson, tcerna
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tuned-2.7.0-1.el7 Doc Type: Release Note
Doc Text:
The number of *inotify* user watches increased to 65536 To allow for more pods on an Red Hat Enterprise Linux Atomic host, the number of *inotify* user watches has been increased by a factor of 8 to 65536.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 07:27:15 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:

Description Jeremy Eder 2016-03-29 14:29:07 UTC
Description of problem:
This bug is in reference to https://github.com/openshift/origin/issues/8209

In a scale-up test of openshift, I noted running out of inotify watches at around 800 pods per node.  While this is not currently supported, we are targeting this level soon, and don't want to lose track.

There's no danger to increasing this by a factor of 8x.

Comment 2 Jeremy Eder 2016-03-29 14:37:53 UTC
diff --git a/profiles/atomic-guest/tuned.conf b/profiles/atomic-guest/tuned.conf
index 6691f1d..c5a9417 100644
--- a/profiles/atomic-guest/tuned.conf
+++ b/profiles/atomic-guest/tuned.conf
@@ -15,3 +15,4 @@ nf_conntrack_hashsize=131072
 [sysctl]
 kernel.pid_max=131072
 net.netfilter.nf_conntrack_max=1048576
+fs.inotify.max_user_watches=65536
diff --git a/profiles/atomic-host/tuned.conf b/profiles/atomic-host/tuned.conf
index 0010077..968366f 100644
--- a/profiles/atomic-host/tuned.conf
+++ b/profiles/atomic-host/tuned.conf
@@ -15,3 +15,4 @@ nf_conntrack_hashsize=131072
 [sysctl]
 kernel.pid_max=131072
 net.netfilter.nf_conntrack_max=1048576
+fs.inotify.max_user_watches=65536

Comment 3 Jaroslav Škarvada 2016-03-29 21:51:26 UTC
Thanks for the patch, upstream commit:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=52f2cc4ad7ad319f0a747136247e976dd00a7669

Comment 6 Tereza Cerna 2016-08-18 13:11:57 UTC
============================================
Verified in:
    tuned-2.7.1-2.el7.noarch
    tuned-profiles-atomic-2.7.1-2.el7.noarch
PASS
============================================

# tuned-adm profile atomic-guest
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 65536     -> OK

# tuned-adm profile balanced
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192

# tuned-adm profile atomic-host
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 65536     -> OK

# tuned-adm profile realtime
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192

# cat /usr/lib/tuned/atomic-guest/tuned.conf | grep inotify
fs.inotify.max_user_watches=65536
# cat /usr/lib/tuned/atomic-host/tuned.conf | grep inotify
fs.inotify.max_user_watches=65536

============================================
Reproduced in:
    tuned-2.5.1-4.el7.noarch
    tuned-profiles-atomic-2.5.1-4.el7.noarch
FAIL
============================================

# tuned-adm profile atomic-guest
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192     -> FAIL

# tuned-adm profile balanced
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192

# tuned-adm profile atomic-host
# sysctl -a | grep inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192     -> FAIL

Comment 8 errata-xmlrpc 2016-11-04 07:27:15 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://rhn.redhat.com/errata/RHBA-2016-2479.html