Merge pull request #186 from leseb/swapoff

Ability to disable swap
pull/187/head
Leseb 2015-01-15 11:44:11 +01:00
commit e18588b147
2 changed files with 7 additions and 1 deletions

View File

@ -124,6 +124,7 @@ radosgw: false # referenced in monitor role too.
###########
disable_transparent_hugepage: true
disable_swap: true
os_tuning_params:
- { name: kernel.pid_max, value: 4194303 }
- { name: fs.file-max, value: 26234859 }

View File

@ -5,8 +5,13 @@
- name: Disable transparent hugepage
command: "echo never > /sys/kernel/mm/transparent_hugepage/enabled"
ignore_errors: true
when: disable_transparent_hugepage
ignore_errors: true
- name: Disable swap
command: swapoff -a
when: disable_swap
ignore_errors: true
- name: Apply OS tuning
sysctl: >