Merge pull request #543 from ceph/min_free_kbytes

ceph-common: calculate vm.min_free_kbytes
pull/548/head
Leseb 2016-02-16 16:27:23 +01:00
commit f86da22ce6
3 changed files with 10 additions and 2 deletions

View File

@ -283,4 +283,4 @@ dummy:
# - { 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

@ -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,14 @@
failed_when: false
when: disable_swap
- name: get default vm.min_free_kbytes
command: sysctl -b vm.min_free_kbytes
register: default_vm_min_free_kbytes
- name: define vm.min_free_kbytes
set_fact:
vm_min_free_kbytes: "{{ 4194303 if ansible_memtotal_mb >= 49152 else default_vm_min_free_kbytes.stdout }}"
- name: apply operating system tuning
sysctl:
name: "{{ item.name }}"