mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-06 18:35:18 +00:00
Add sysctl states for vm, fs and some kernel params.
This commit is contained in:
parent
75af253151
commit
f0d8ab72da
11
sls/sysctl/fs.sls
Normal file
11
sls/sysctl/fs.sls
Normal file
@ -0,0 +1,11 @@
|
||||
{% set fs = salt['pillar.get']('sysctl:fs', {}) %}
|
||||
|
||||
fs.file-max:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/fs.conf'
|
||||
- value: {{ fs.get('file-max', 1000000) }}
|
||||
|
||||
fs.inotify.max_user_watches:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/fs.conf'
|
||||
- value: {{ fs.get('inotify.max_user_watches', 100000) }}
|
11
sls/sysctl/kernel.sls
Normal file
11
sls/sysctl/kernel.sls
Normal file
@ -0,0 +1,11 @@
|
||||
kernel.pid_max:
|
||||
sysctl.present:
|
||||
- value: 999999
|
||||
|
||||
kernel.panic:
|
||||
sysctl.present:
|
||||
- value : 30
|
||||
|
||||
kernel.sched_migration_cost_ns:
|
||||
sysctl.present:
|
||||
- value: 5000000
|
27
sls/sysctl/vm.sls
Normal file
27
sls/sysctl/vm.sls
Normal file
@ -0,0 +1,27 @@
|
||||
{% set vm = salt['pillar.get']('sysctl:vm', {}) %}
|
||||
|
||||
vm.swappiness:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/vm.conf'
|
||||
- value: {{ vm.get('swappiness', 0) }}
|
||||
|
||||
vm.zone_reclaim_mode:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/vm.conf'
|
||||
- value: {{ vm.get('zone_reclaim_mode', 0) }}
|
||||
|
||||
vm.dirty_bytes:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/vm.conf'
|
||||
- value: {{ vm.get('dirty_bytes', 33554432) }}
|
||||
|
||||
vm.dirty_background_bytes:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/vm.conf'
|
||||
- value: {{ vm.get('dirty_background_bytes', 8388608) }}
|
||||
|
||||
vm.min_free_kbytes:
|
||||
sysctl.present:
|
||||
- config: '/etc/sysctl.d/vm.conf'
|
||||
- value: {{ vm.get('min_free_kbytes', 262144) }}
|
||||
|
Loading…
Reference in New Issue
Block a user