Bump fs.inotify.max_user_instances for scale

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 1024 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

Related Bugs:

Change-Id: I39664312bf6cf06f1e1ca2e86ffd86fb9a4582ad
Closes-Bug: 1718266
Sai Sindhur Malleni 2017-09-19 15:12:35 -04:00
parent ab682ed638
commit d2d0c3ff00
1 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,11 @@ parameters:
ARP cache. The garbage collector will always run if there
are more than this number of entries in the cache.
type: number
default: 1024
description: Configures sysctl fs.inotify.max_user_instances key
type: number
@ -129,5 +134,9 @@ outputs:
value: {get_param: NeighbourGcThreshold2}
value: {get_param: NeighbourGcThreshold3}
# set inotify value for neutron/dnsmasq scale
value: {get_param: InotifyIntancesMax}
step_config: |
include ::tripleo::profile::base::kernel