ceph-common: calculate vm.min_free_kbytes

based on the os memory we calculate the value for vm.min_free_kbytes

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/543/head
Sébastien Han 2016-02-15 15:03:10 +01:00
parent 3ba68d3836
commit 4ede7211a0
2 changed files with 5 additions and 1 deletions

View File

@ -295,7 +295,7 @@ os_tuning_params:
- { name: fs.file-max, value: 26234859 }
- { name: vm.zone_reclaim_mode, value: 0 }
- { name: vm.vfs_cache_pressure, value: 50 }
- { name: vm.min_free_kbytes, value: 4194303 }
- { name: vm.min_free_kbytes, value: "{{ vm_min_free_kbytes }}" }
##########

View File

@ -16,6 +16,10 @@
failed_when: false
when: disable_swap
- name: calculate vm.min_free_kbytes
set_fact:
vm_min_free_kbytes: "{{ 4194303 if ansible_memtotal_mb >= 49152 else (ansible_memtotal_mb * 1024 / 100)|int }}"
- name: apply operating system tuning
sysctl:
name: "{{ item.name }}"