We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 869f206 commit bf7fdfdCopy full SHA for bf7fdfd
2 files changed
files/common/thp_enable.sh
@@ -0,0 +1,7 @@
1
+#!/usr/bin/env bash
2
+#
3
4
+echo madvise > /sys/kernel/mm/transparent_hugepage/enabled
5
+echo advise > /sys/kernel/mm/transparent_hugepage/shmem_enabled
6
+echo > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
7
+echo defer > /sys/kernel/mm/transparent_hugepage/defrag
roles/automation/tasks/main.yml
@@ -59,3 +59,19 @@
59
priv: "ledger.*:ALL"
60
with_items:
61
- 172.18.0.0/255.255.0.0
62
+
63
+- name: add transparent huge page script
64
+ copy:
65
+ dest: /home/automation/scripts/thp_enable.sh
66
+ src: files/common/thp_enable.sh
67
+ mode: 0755
68
+ owner: root
69
+ group: root
70
+ force: true
71
72
+- name: enable thp on reboots
73
+ cron:
74
+ name: "enable thp"
75
+ job: "/home/automation/scripts/thp_enable.sh"
76
+ special_time: "reboot"
77
+ state: present
0 commit comments