From 25cf4d8650dc624fb5891c57c4a743105c58051e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 13 Jan 2015 11:09:53 +0100 Subject: [PATCH] Ability to disable transparent hugepage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In storage world it's often recommended to disable transparent hugepages as they will tend to lower performance. Note that this change won't survive reboot. There are several ways to disable this permanently such as: * rc.local * grub boot line It's a bit tricky to do this in Ansible since it really depends on the OS you're running on. Signed-off-by: Sébastien Han --- roles/ceph-common/defaults/main.yml | 1 + roles/ceph-common/tasks/os_tuning.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 7085658c5..aebdc7f5a 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -119,6 +119,7 @@ radosgw: false # referenced in monitor role too. # OS TUNING ########### +disable_transparent_hugepage: true os_tuning_params: - { name: kernel.pid_max, value: 4194303 } - { name: fs.file-max, value: 26234859 } diff --git a/roles/ceph-common/tasks/os_tuning.yml b/roles/ceph-common/tasks/os_tuning.yml index 1b2c7ef6c..137005850 100644 --- a/roles/ceph-common/tasks/os_tuning.yml +++ b/roles/ceph-common/tasks/os_tuning.yml @@ -3,6 +3,11 @@ command: updatedb -e /var/lib/ceph ignore_errors: true +- name: Disable transparent hugepage + command: "echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled" + ignore_errors: true + when: disable_transparent_hugepage + - name: Apply OS tuning sysctl: > name={{ item.name }}