Bump fs.inotify.max_user_instances on gateway nodes for scale
This problem appeared with latest dnsmasq version.
Since each dnsmasq process consumes one inotify socket, the default
value of fs.inotify.max_user_instances which is 128 lets us scale to
only around a 116 neutron subnets (a few other sockets are used by other
processes on the system). Since, we need to provide better defaults,
this patch proposes to bump this value to 1024 by default, while giving
the user a way to cahnge it. Based on
https://unix.stackexchange.com/a/13757 each inotify watch takes 1KB of
memory and we have fs.inotify.max_user_watches set to 8192 by default.
This means that even in the worst case we won't be using more than 8MB
of memory. Bumping the fs.inotify.max_user_instances value to 4096 is
safe because there is fs.inotify.max_user_watches which caps the total
number of files that can be watched by all the inotify instances a user
has.
Fixes Prod: PROD-16064
Change-Id: I3394bb423f3079fad6f64708a4b5ed3011415169
diff --git a/neutron/gateway/cluster.yml b/neutron/gateway/cluster.yml
index c96c6bb..558a814 100644
--- a/neutron/gateway/cluster.yml
+++ b/neutron/gateway/cluster.yml
@@ -4,6 +4,11 @@
_param:
neutron_enable_qos: False
neutron_enable_vlan_aware_vms: False
+ linux:
+ system:
+ kernel:
+ sysctl:
+ fs.inotify.max_user_instances: 4096
neutron:
gateway:
dvr: ${_param:neutron_gateway_dvr}