Ability to disable swap

With enough memory we will probably not need any swap.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
pull/186/head
Sébastien Han 2015-01-15 11:42:51 +01:00
parent 0bafee18ad
commit c246d8dc80
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: >