Browse Source

Disable Transparent Huge Page support

Philippe Caseiro 10 months ago
parent
commit
07e64177f1
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      postservice/90-redis-init

+ 7
- 3
postservice/90-redis-init View File

@@ -158,9 +158,8 @@ do
158 158
 	MASTERS+=([${name}]=${master})
159 159
 done < ${CONF}
160 160
 
161
-# If the cluster is "ok" don't do anything
162
-st=$(redisClusterIsOK ${LeaderIP} ${LeaderPort})
163
-[[ ${?} -eq 0 ]] && exit 0
161
+# Disable Transparent Huge Page support on kernel
162
+echo never > /sys/kernel/mm/transparent_hugepage/enabled
164 163
 
165 164
 if [[ ${1} == "forget" ]]
166 165
 then
@@ -168,6 +167,10 @@ then
168 167
     exit ${?}
169 168
 fi
170 169
 
170
+# If the cluster is "ok" don't do anything
171
+st=$(redisClusterIsOK ${LeaderIP} ${LeaderPort})
172
+[[ ${?} -eq 0 ]] && exit 0
173
+
171 174
 
172 175
 if [[ -e ${INITFLAG} ]]
173 176
 then
@@ -247,5 +250,6 @@ echo
247 250
 redisRun ${LeaderIP} ${LeaderPort} cluster info
248 251
 echo
249 252
 
253
+touch ${INITFLAG}
250 254
 
251 255
 exit 0