]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Ability to disable transparent hugepage 181/head
authorSébastien Han <sebastien.han@enovance.com>
Tue, 13 Jan 2015 10:09:53 +0000 (11:09 +0100)
committerSébastien Han <sebastien.han@enovance.com>
Tue, 13 Jan 2015 10:11:11 +0000 (11:11 +0100)
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 <sebastien.han@enovance.com>
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/os_tuning.yml

index 7085658c5a68406a57d26406d0a26f6a919765dd..aebdc7f5af2702dd0256573e7fde9379d0cbe807 100644 (file)
@@ -119,6 +119,7 @@ radosgw: false # referenced in monitor role too.
 # OS TUNING\r
 ###########\r
 \r
+disable_transparent_hugepage: true\r
 os_tuning_params:\r
   - { name: kernel.pid_max, value: 4194303 }\r
   - { name: fs.file-max, value: 26234859 }\r
index 1b2c7ef6c297f1d63b06ac28744b12fb18fb8e23..13700585069758792e396a11fedc9f6fa24f0baf 100644 (file)
@@ -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 }}