Cron job for Kernel (can or not) - transparent_hugepage/enabled

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
Hello, i see it in the docs of redis:

In the old Redis, you need to put it in a script any time you reboot the server, the script shot it.
i suspect maybe better to do a cron job for huge page every day / hour, it will shoot every hour or day (this why i asking here):

50 * * * * root echo madvise > /sys/kernel/mm/transparent_hugepage/enabled

It something i can do?
Or it can cause issue with the kernel if i will shoot the command line too much?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
Hey there! Once the change is made, it should stick and not need to be reapplied on each reboot. The best way to confirm would be to run the echo statement once, and then reboot the system and confirm it is still in place.
 

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
How can i confirm it?

Because of Redis older versions, it shows errors in the logs any time i reboot the server.
On Redis 7 its recommendation, but i prefer to confirm it as you said (i little suspect on it)

if you can tell me, what commend line can check it after i reboot the server it will be great :)
 

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
[root@server ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

i have “never” too ( i run it one time with never when i install the old Redis via EA4 )

The output is good? Even we have both: "never" and "madvise"?
 

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
¨never¨ was recommended in the old Redis (all of them except Redis 7)

I did one time when i install the old Redis, in the Redis 3 (EA4 WHM Interface):
never > /sys/kernel/mm/transparent_hugepage/enabled

this why the NEVER is there,

you sure don't need to fix it? Or it can stay like this:

[root@server ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never


or need new commend to adjust it?